Hi I have problem with fetching data from one column separated with comma,
My problem is:
Table1
ID | Cat
--------
1 | XY
2 | ER
3 | FF
Table2
Id | Text | Text2 | Table1ID | Text3 | text3
--------------------------------------------------
1 | -- | -- | 1,2,3 | --- | ---
2 | -- | -- | 3,1,2 | --- | ---
3 | -- | -- | 1,3,4 | --- | ---
I need SELECT query to fetch data from Table1 column Cat where Table1.ID=Table2.Table1ID and i got only one Cat but i need all from Table2.Table1ID
This is my query now:
SELECT * FROM Table2, Table1
WHERE Table2.Table1ID=$ID
AND Table2.Table1ID=Table1.Id
AND Table2.Table1ID
I only got one data from Table1ID and everything behind comma is invisible
thx for help
1 Answer