Question #6200265

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,,, 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,;

2013-05-10 21:49:22

TELL US , if you have any answer

There is NEVER a problem, ONLY a challange!

The is a free-to-use knowledgebase.
  The was started on: 02.07.2010.
  It's free to register. Once you are a registered user, you can ask questions, or answer them.
  (Unless registration you can just answer the questions anonymously)
  Only english!!! Questions and answers in other languages will be deleted!!

Cheers: the PixelFighters


C'mon... follow us!

Made by, history, ect.