иногда дублирует
SELECT p.product_id FROM oc_product p
JOIN oc_new_product np ON (p.product_id = np.product_id)
LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id)
WHERE p.quantity > 0
AND np.product_id > 0
AND p.status = '1'
AND p.date_available <= NOW()
AND p2s.store_id = '0'
ORDER BY np.date_added DESC
LIMIT 0,200"
int(161)
oc_product p
Обсуждают сегодня