전체 건
-
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_personal 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_personal'
where 1 = 1 and product.wm_use = 'Y'
order by product.wm_sort asc limit 0, 8
-
개인결제1 100 원