코멘트 일괄삭제하니까 에러가 떠요.. 정보
코멘트 일괄삭제하니까 에러가 떠요..본문
http://sir.co.kr/bbs/tb.php/g4_tiptech/14081
<?
// 코멘트 삭제
include_once("./_common.php");
$write_table = B11_1;
$res = sql_query(" select * from $write_table where wr_comment > 0 order by wr_id desc ");
while($row=sql_fetch($res)){
$gd_qry = " delete from $write_table where wr_parent = '$row[wr_id]' and wr_is_comment > 0 ";
mysql_query($gd_qry);
}
?>
특정게시판의 모든 코멘트를 일괄삭제하기위해서
활용팁에 있는 위와같은 팁을 적용해서 실행했더니 아래와같은 에러가 뜹니다...
select * from B11_1 where wr_comment > 0 order by wr_id desc
1146 : Table 'inside.B11_1' doesn't exist
error file : /plugin/admin/board/comment.php
댓글 전체
$write_table = B11_1;
=> 이걸 아래와 같이 수정하시면 됩니다.
$write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
=> 이걸 아래와 같이 수정하시면 됩니다.
$write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
그렇게 수정하면 모든 게시판의 코멘트를 삭제하게되나요??
전 ... B11_1게시판의 코멘트만 삭제하고싶은데...
전 ... B11_1게시판의 코멘트만 삭제하고싶은데...
B11_1만 삭제하실꺼면
앞에 그누보드 게시판 기본값을 추가하면 됩니다.
$write_table = "g4_write_B11_1";
또는
$write_table = $g4['write_prefix'] ."B11_1";
앞에 그누보드 게시판 기본값을 추가하면 됩니다.
$write_table = "g4_write_B11_1";
또는
$write_table = $g4['write_prefix'] ."B11_1";
그렇게도 해봤는데 자꾸 에러가나요.,..
Resource id #58
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Resource id #58' at line 1
error file : /plugin/admin/board/comment.php
Resource id #58
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Resource id #58' at line 1
error file : /plugin/admin/board/comment.php