코멘트 일괄삭제하니까 에러가 떠요.. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

코멘트 일괄삭제하니까 에러가 떠요.. 정보

코멘트 일괄삭제하니까 에러가 떠요..

본문

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

  • 복사

댓글 전체

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
© SIRSOFT
현재 페이지 제일 처음으로