I have two tables:
UserTable
id nama
-- -------------------
1 Administrator
11 Agung
21 Sagita
50 John
100 Purnama
Filtertable
id idlist
-- ------------------
1 1,21,100
2 21,50
So I want to query name table with id from the second table
SELECT id, nama FROM UserTable
WHERE id IN (SELECT idlist FROM FilterTable WHERE id =1)
But In MySQL the result only show
id nama
------ ---------------
1 Administrator
While it should show at least 3 rows from UserTable
I think this should be easy but I've tried search google and stackoverflow without solution, kindly show me how to get what I need
This is a simplification, further implementation is for saving search history (the table's ids) from visitors