에러문 해석좀.. > 십년전오늘

십년전오늘

10년전 추억의 책장을 넘기며

에러문 해석좀.. 정보

에러문 해석좀..

본문

select count(*) as cnt from order by ws_id desc
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 'order by ws_id desc' at line 4
error file : /adm/website_list.php
  • 복사

댓글 전체

select count(*) as cnt from order by ws_id desc
셀렉트 다음으로 count(*) 만 있습니다. 뒤에 ws_id 로 정렬하라는 명령이 있지만
검색 필드에는 ws_id 가 없습니다. oder by 구문부터 삭제바랍니다.
select count(*) as cnt from order by ws_id desc
에서
select count(*) as cnt from 테이블명 order by ws_id desc 으로 변경되어야 합니다.

select 명령은

"select 필드명 리스트 from 테이블명 where 조건 order by 정렬필드" 입니다.
© SIRSOFT
현재 페이지 제일 처음으로