I have a table of products:
PRODUCTS(ID, Name, Description, MasterID)
PRODUCTS
ID | NAME | DESCRIPTION | MASTERID
===|=========|=================|=========
1 | WIDGET | All purpose | 0
2 | Mac | Mac version | 1
3 | Linux | Linux version | 1
3 | Windows | Windows version | 1
MasterID is a foreign key to PRODUCTS.ID
I need to do a SELECT in mySQL that will list the product and all of it's children in one field.
So if I select ID = 1 Then I would get a field CHILDREN that has Mac Linux Windows. If there are no children get NULL