일정기간기준으로 노출되기 정보
일정기간기준으로 노출되기본문
http://sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=215620#c_215625
여기보시면 질문대로 답변대로 했는데요 안되요;;
select distinct wr_parent from g4_write_total where and wr_datetime <='2012-02-10'
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 'and wr_datetime <='2012-02-10'' at line 1
error file : /gnuboard4/bbs/board.php
이런게 뜨네요;
sql버전문젠가요????
여기보시면 질문대로 답변대로 했는데요 안되요;;
select distinct wr_parent from g4_write_total where and wr_datetime <='2012-02-10'
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 'and wr_datetime <='2012-02-10'' at line 1
error file : /gnuboard4/bbs/board.php
이런게 뜨네요;
sql버전문젠가요????
댓글 전체
기본적으로 wr_datetime 의 데이터 길이는 Y-m-d H:i:s 해서 총 19자리의 데이터입니다.
(예: 2012-02-17 17:56:35 형식)
그런데 날짜크기비교를 10자리데이터로 하셨으니 에러가나는겁니다.
wr_datetime을 이렇게 감싸주세요.
left(wr_datetime,10)
(예: 2012-02-17 17:56:35 형식)
그런데 날짜크기비교를 10자리데이터로 하셨으니 에러가나는겁니다.
wr_datetime을 이렇게 감싸주세요.
left(wr_datetime,10)
$sql_search .= " and left(wr_datetime,10) <='2012-02-17 17:56:35' ";
요렇게요???
요렇게요???