c

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

안녕하세요...또 도움을 받고자 합니다.
호스팅업체 이전 후 발생하였습니다.
테이블이며,db 다 존재하는데 이렇게 열립니다.
도움 좀 부탁드립니다.

select , case wr_id when 102 then 0 when 101 then 1 when 100 then 2 when 99 then 3 when 98 then 4 when 97 then 5 when 95 then 6 when 94 then 7 when 93 then 8 when 92 then 9 when 91 then 10 when 90 then 11 when 89 then 12 when 88 then 13 when 87 then 14 else 10000 end as fsort from g4_write_ren1 where wr_id = 102 or wr_id = 101 or wr_id = 100 or wr_id = 99 or wr_id = 98 or wr_id = 97 or wr_id = 95 or wr_id = 94 or wr_id = 93 or wr_id = 92 or wr_id = 91 or wr_id = 90 or wr_id = 89 or wr_id = 88 or wr_id = 87 order by fsort,wr_num, wr_reply

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 ' case wr_id when 102 then 0 when 101 then 1 when 100 then 2 wh

error file : /bbs/bbs/board.php

댓글 1개

호스팅 업체의 mysql 버전에 따라 위의 쿼리는 실행되지 않을수 있습니다.
그리고 select 다음에 있는 , 은 오타인것 같네요.

case 구문이 지원되지 않는 mysql 버전이면, 해당 구문을 IF ELSE 로 변경하셔야 합니다.
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
10-03-31 조회 1,665
10-03-31 조회 1,647
10-03-31 조회 1,507
10-03-30 조회 1,559
10-03-30 조회 1,622
10-03-30 조회 1,502
10-03-30 조회 1,705
10-03-30 조회 1,616
10-03-30 조회 1,022
10-03-30 조회 1,648
10-03-30 조회 4,202
10-03-30 조회 1,060
10-03-30 조회 1,044
10-03-30 조회 887
10-03-30 조회 1,137
10-03-30 조회 1,546
10-03-30 조회 1,657
10-03-30 조회 1,631
10-03-30 조회 2,014
10-03-30 조회 1,096