SQL help - Need one row for each product, not one row for each attribute?
Hey everyone, I'm trying to query my opencart database and I want to get all the attributes in a row that pertain to that certain product(if that's possible). Here is what I have so far. It provides all the attribute for each product but for each attribute it creates a whole new row. I want all the attributes in one row if possible. Thanks! SELECT product.product_id, product.model, product_description.name, attribute_description.name, text FROM product, product_attribute, attribute, attribute_description, product_description WHERE product.product_id = product_attribute.product_id AND product_attribute.attribute_id = attribute.attribute_id AND attribute_description.attribute_id = attribute.attribute_id AND product.product_id = product_description.product_id order by product_id, attribute_description.name;
TELL US , if you have any answer