Jump to content

Edycja zapytania SQL


wolfen1223

Recommended Posts

Witam chciałem podziękować za pomoc przy ostatnim problemie mam jeszcze jedną sprawę jest tu dobra dusza która pomoże mi zmodyfikować to zapytanie SQL?? Chciałbym aby wyświetlało mi same łóżka zamiast całego asortymentu :)

SELECT DISTINCT pl.name, pa.*, ag.id_attribute_group, ag.is_color_group, agl.name AS group_name, al.name AS attribute_name, a.id_attribute, pa.unit_price_impact

FROM ps_product_attribute pa

LEFT JOIN ps_product_attribute_combination pac ON pac.id_product_attribute = pa.id_product_attribute

LEFT JOIN ps_attribute a ON a.id_attribute = pac.id_attribute

LEFT JOIN ps_attribute_group ag ON ag.id_attribute_group = a.id_attribute_group

LEFT JOIN ps_attribute_lang al ON (a.id_attribute = al.id_attribute AND al.id_lang = 1)

LEFT JOIN ps_attribute_group_lang agl ON (ag.id_attribute_group = agl.id_attribute_group AND agl.id_lang = 1)

LEFT JOIN ps_product_lang pl ON (pa.id_product = pl.id_product)

ORDER BY pa.id_product_attribute;

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...