php sql 쿼리 문법 질문!
select distinct wr_parent from g4_write_kira where ((INSTR(wr_3, '1')) ) and (wr_num between '-3' and '9997') and wr_4 not in ''
다음과 같이 쓰고 싶은데... 어떻게 고쳐야 할까요?
다음과 같이 쓰고 싶은데... 어떻게 고쳐야 할까요?
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 6개
if($no){
$sql_search2 = " and ".$no." not in ''";
}
// 원글만 얻는다. (코멘트의 내용도 검색하기 위함)
$sql = " select distinct wr_parent from $write_table where $sql_search $sql_search2 ";
이렇게 bbs/list.php를 수정 추가하고.
게시판 검색 주소에
&sfl=wr_3&stx=1&no=wr_4
이런식으로 줬거든요.
그랬더니..
select distinct wr_parent from g4_write_kira where ((INSTR(wr_3, '1')) ) and (wr_num between '-3' and '9997') and wr_4 not in ''
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 '''' at line 1
error file : /kira/bbs/board.php
이런에러가 떠서 ^^;;