Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DISTINCT p.product_id AS id, p.product_code AS code, p.product_name AS name, p.product_price AS price, p.product_image AS image, p.product_url AS url, `ps`.`model_id`, ps.product_stock AS stock
- FROM products p
- INNER JOIN products_storage ps ON p.product_id = ps.product_id AND ps.storage_id = 0
- INNER JOIN products_attributes pa ON p.product_id = pa.product_id
- INNER JOIN products_models pm ON pa.attribute_id = pm.attribute_id
Advertisement
Add Comment
Please, Sign In to add comment