table: user
| user_Id | my_threads |
| 100 | 200:1, 201:2, 217:4 |
| 101 | 200:1, 215:3, 217:4 |
Table: thread
| thread_id | author_id | title |
| 217 | 100 | This is title thread |
| 200 | 101 | this is only test |
When the user login successfully $userId=user_Id, show title of that user threads?
select title
from thread
where FIND_IN_SET(thread.thread_id,(select my_threads from user where user_id=100));
this sql above works when my_threads no colon like this 200, 217
try this:
replace your colon to commas
SQL fiddle demo