SET @rownum = ( SELECT count( * ) FROM board ) -0 +1;
SELECT @rownum := @rownum -1 AS no, title, name, Date_Format( regdate, '%Y.%m.%d' ) date, clickcnt
FROM board
ORDER BY bseq DESC
LIMIT 0 , 10;
이것이 사용하고자 했던 소스코드 입니다.
물론 정확히 phpmyadmin이나 mysql-command창에서는 잘~ 됩니다..
그런데 문제는 php페이지에서
mysql_query로 처리할경우 mysql_error로 메세지가 날라온다는거죠..
당연히 실행도 안되구요...;;
아래가 에러메세지 입니다..
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 '; SELECT @rownum:=@rownum-1 as no, title,name, Date_Format(regdate,'%Y.%' at line 1
도데체 뭐가 잘못된걸까요?
......답변 부탁드립니다 ㅡㅜ
|