sql 구문 해석 좀 부탁드립니다.

sql 구문 해석 좀 부탁드립니다.

QA

sql 구문 해석 좀 부탁드립니다.

답변 1

본문

$sql = "select * from $g4[board_file_table] as f, $g4[board_table] as b

where f.bo_table = b.bo_table and bf_type > 0 and bf_type < 4 and bf_no = 0 and b.bo_use_search = '1'

order by bf_datetime desc limit $multiple"; 

 

 

 

위 구문의 의미를 한줄한줄 해석 좀 부탁드립니다.

이 질문에 댓글 쓰기 :

답변 1

select * from 

이하 검색에서 나오는 모든 값을 출력하라

$g4[board_file_table] as f, $g4[board_table] as b

$g4[board_file_table]를 f라고 하고 $g4[board_table] 를 b​라고 일단 정의하고,

where f.bo_table = b.bo_table and bf_type > 0 and bf_type < 4 and bf_no = 0 and b.bo_use_search = '1'

f의 bo_table 값이 b의bo_table 값이랑 같은 값중에서 bf_type이 0이상이고 4 이하인것을 뽑고 그중에서 bf_no가 0인것을 골라내고 bo_use_search가 1인것을 골라내라

 

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 129,118
© SIRSOFT
현재 페이지 제일 처음으로