dmacman1962;10877401 wrote:
Maybe I did not explain what I get with a single query, vs the JOIN I attempting.
Yeah, always good to show your table structure when posting a question like this.
Okay, it appears that you have an orders table, an orders_product table, and an orders_product_attributes table.
I'll assume that orders_id is a primary key in orders and a foreign key in orders_product and orders_product_attributes.
It appears, you are using this query on a "orders detail page" to get the item listings.
Now, here is the "problem", it appears, based on your query, that you have no way to link an attribute to a product.
Of course, I have no idea unless you post your table structure.
But again, if you have 3 records with one id in one table and you have two records with the same id in another table, and now you join them, you'll get 6 records like you mentioned. In other words you have a many-to-many relationship. If you had an item id associated with your attribute, you'd at least have a one-to-many relationship.
Perhaps you shouldn't join on "orders_id".