I saw many similar questions some how i could not find my answer. Here is the deal. I have two tables. I'm trying to find a way to stimulate a text array into in-clause.
table.list table.user
+--------+ +--------+
|id|list | |id|name |
+--+-----+ +--+-----+
| 1|1,2,3| | 1|jack |
+--+-----+ +--+-----+
| 2|6,8 | | 2|john |
+--+-----+ +--+-----+
| 3|jane |
+--+-----+
| 6|jim |
+--+-----+
| 8|jade |
+--+-----+
Here is my lovely piece of in-clause code.
SELECT (SELECT GROUP_CONCAT(user.name)
FROM user WHERE user.id in (list.list)
)
FROM list;
My question is is there any way to convert list.list to an array. I know the difference. Normally it should be like in (1,2,3) or ('1','2','3') but now i have ('1,2,3'). Any ideas.