게시판에서 내가 작성한 코멘트 갯수뽑기 질문 정보
질문 게시판에서 내가 작성한 코멘트 갯수뽑기 질문본문
$my_cmt_qry="select * from g4_write_$row[bo_table] where wr_comment = '0' and mb_id = '$member[mb_id]'";
$my_cmt_qry="select * from g4_write_$row[bo_table] where wr_comment = '-1' and mb_id = '$member[mb_id]'";
$my_cmt_qry="select * from g4_write_$row[bo_table] where wr_comment > '-1' and mb_id = '$member[mb_id]'";
$my_cmt_qry="select * from g4_write_$row[bo_table] where wr_comment < '-1' and mb_id = '$member[mb_id]'";
위와 같이 다 해봤습니다.
모두 엉뚱한 숫자를 뽑아오네요.
어떻게 해야 하는지 좀 가르쳐 주셔요~~~!!!!
$my_cmt_qry="select * from g4_write_$row[bo_table] where wr_comment = '-1' and mb_id = '$member[mb_id]'";
$my_cmt_qry="select * from g4_write_$row[bo_table] where wr_comment > '-1' and mb_id = '$member[mb_id]'";
$my_cmt_qry="select * from g4_write_$row[bo_table] where wr_comment < '-1' and mb_id = '$member[mb_id]'";
위와 같이 다 해봤습니다.
모두 엉뚱한 숫자를 뽑아오네요.
어떻게 해야 하는지 좀 가르쳐 주셔요~~~!!!!
댓글 전체
그렇네요.
관리자님 말씀대로 해야 코멘트가 하나도 없는 게시판의 코멘트 갯수를 제대로 가져옵니다.
제가 한 방법은 해당 게시판에 코멘트가 하나도 없는데도 카운트를 하나 올려주는 결과가 발생합니다.
관리자님 말씀대로 해야 코멘트가 하나도 없는 게시판의 코멘트 갯수를 제대로 가져옵니다.
제가 한 방법은 해당 게시판에 코멘트가 하나도 없는데도 카운트를 하나 올려주는 결과가 발생합니다.
$my_cmt_qry="select * from g4_write_$row[bo_table] where wr_comment < '0' and mb_id = '$member[mb_id]'";
이렇게 하셔야 코멘트만 가지고 올 수 있습니다.
이렇게 하셔야 코멘트만 가지고 올 수 있습니다.
해결했습니다. ^^*
아래와 같이 하니까 되네요.
$my_cmt_qry="select * from g4_write_$row[bo_table] where wr_comment < '1' and mb_id = '$member[mb_id]'";
아래와 같이 하니까 되네요.
$my_cmt_qry="select * from g4_write_$row[bo_table] where wr_comment < '1' and mb_id = '$member[mb_id]'";