0 -
SQL:select p.*,s.product_specials_price from (select p.product_id,p.product_model,p.product_item_no,product_price,product_image1,f.create_date from products p,product_plat pt,favorite f where p.product_status = '0' and p.product_id = pt.product_id and pt.plat_id = 2 and f.product_id = p.product_id and f.plat_id = 2 and f.customer_id = ) p LEFT OUTER JOIN product_specials s ON p.product_id =s.product_id and s.product_specials_status = '0' and ((s.product_specials_begin is null and s.product_specials_end is null) or (s.product_specials_begin < now() and s.product_specials_end is null) or(s.product_specials_begin is null and s.product_specials_end > now()) or (now() between s.product_specials_begin and s.product_specials_end )) order by p.create_date desc limit 0,10
[TEP STOP]
|