wimogas Posted September 30, 2015 Share Posted September 30, 2015 (edited) I need to render Specific Prices, From Quantity, Attribute name and Product Id. This: " SELECT sp.id_product, sp.id_specific_price, sp.from_quantity, sp.price, pa.id_product_attribute, pa.reference, pc.id_attribute, al.name FROM ps2_specific_price sp LEFT JOIN ps2_product_lang pl ON (sp.id_product = pl.id_product) LEFT JOIN ps2_product_attribute pa ON (sp.id_product = pa.id_product) LEFT JOIN ps2_product_attribute_combination pc ON (pa.id_product_attribute = pc.id_product_attribute) LEFT JOIN ps2_attribute_lang al ON (pc.id_attribute = al.id_attribute) WHERE pl.id_lang = 1 " Renders this (red is not valid, not set values): Does anyone know why this happens? The duplicates are not Languages. Thanks G Edited September 30, 2015 by wimogas (see edit history) Link to comment Share on other sites More sharing options...
wimogas Posted September 30, 2015 Author Share Posted September 30, 2015 (edited) To make myself clear, Basically if I have this: I need to see the attribute name for each Specific Price: If attributes are: Green Yellow Red Blue Thanks Edited September 30, 2015 by wimogas (see edit history) Link to comment Share on other sites More sharing options...
wimogas Posted September 30, 2015 Author Share Posted September 30, 2015 Solved (thanks prestatent) : " SELECT a.id_product, a.id_specific_price, a.from_quantity, a.price, c.id_product_attribute, c.reference, d.id_attribute, e.name FROM ps2_specific_price a, ps2_product_lang b, ps2_product_attribute c, ps2_product_attribute_combination d, ps2_attribute_lang e WHERE b.id_lang = 1 and b.id_product = c.id_product and c.id_product_attribute = d.id_product_attribute and d.id_attribute = e.id_attribute and e.id_lang = 1 and b.id_product = a.id_product and c.id_product_attribute = a.id_product_attribute " Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now