상단 광고 매물
-
select product.* , fi.wm_filename, fi.wm_file_width, fi.wm_file_height from
(
SELECT
pd.*
, ca1.wm_ca_id as ca_id1
, ca2.wm_ca_id as ca_id2
, ca3.wm_ca_id as ca_id3
, ca1.wm_ca_name as ca_id1_name
, ca2.wm_ca_name as ca_id2_name
, ca3.wm_ca_name as ca_id3_name
FROM
sp_product as pd LEFT JOIN
sp_category as ca1 on pd.wm_ca_id1 = ca1.wm_id LEFT JOIN
sp_category as ca2 on pd.wm_ca_id2 = ca2.wm_id LEFT JOIN
sp_category as ca3 on pd.wm_ca_id3 = ca3.wm_id
) as product
LEFT JOIN
sp_board_file as fi on product.wm_id = fi.wm_bid and fi.wm_num = 0 and fi.wm_table = 'sp_product'
where 1 = 1 and product.wm_kind1 = '' and product.wm_kind2 = '' and product.wm_use = 'Y' and ( product.ca_id1 like '0208%' or product.ca_id2 like '0208%' or product.ca_id3 like '0208%' )
order by product.wm_sort asc, product.wm_id desc limit 0, 16
등록된 제품이 없습니다.