HosipLan

Untitled

Jul 30th, 2011
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.43 KB | None | 0 0
  1. 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
  2. FROM products p
  3. INNER JOIN products_storage ps ON p.product_id = ps.product_id AND ps.storage_id = 0
  4. INNER JOIN products_attributes pa ON p.product_id = pa.product_id
  5. INNER JOIN products_models pm ON pa.attribute_id = pm.attribute_id
Advertisement
Add Comment
Please, Sign In to add comment