I have two tables :
tbllocations
ID | Name | Type
1 | Location1 | {"0":"23","1":"27","2":"24","3":"22"}
2 | Location2 | {"0":"22","1":"25"}
tbllocationtypes
ID | title
22 | Wines
23 | Milk
24 | Cereals
25 | Drinks
26 | Beef
27 | Chicken
In the Type
field (with this exact format) the foreign keys of types are specially separated
"0":"Default Foreign Key of tbllocationtype",
"1","First additional Foreign Key of tbllocationtype",
"2","Second Additional Foreign Key of tbllocaitontype"
I need to have a list with all location with a field which contains all types like this :
Result of query :
IDLocation | Name | Types
1 Location1 Milk,Chicken,Cereals,Wine
2 Location2 Wines,Drinks
Could you please help me? I'm too bad in MySQL to find that out.
Thanks a lot