the topic is rather misleading but i couldn't find a better way to phrase it.. here's my scenario:
Table A: Products
Table B: Attributes (with a product_id to show which product it belongs to)
i need to join the 2 tables to get what i require, which is a html like so:
Expand|Select|Wrap|Line Numbers
- Product A Attribute 1
- Attribute 2
- Attribute 3
- Product B Attribute 5
- Product C Attribute 6
- Attribute 7
Expand|Select|Wrap|Line Numbers
- SELECT *
- FROM (SELECT * FROM Attributes where Attribute_Name LIKE '%...%') as A
- join
- (SELECT * FROM Products limit 0,10) as P
- on (P.Id=A.Product_Id)
As with my statement, it gets the 1st 10 products, and joins with attributes that contain the search... which doesnt mean i will have 10 unique products based on the attributes...
hope my scenario was described well enough.. thanks