채택완료

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

2015-03-22 (일) 11:43:08 4,278

$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개 / 댓글 1개

채택된 답변
+20 포인트
2015-03-22 (일) 13:19:37

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인것을 골라내라

 

답변에 대한 댓글 1개

이렇게 빨리 자세하게 설명해주시다니 고맙습니다. 즐거운 일요일 되세요!
[http://blog-imgs-44.fc2.com/w/a/r/wareureu/227.gif]

답변을 작성하려면 로그인이 필요합니다.