Possible Duplicate:
Searching a column containing CSV data in a MySQL table for existence of input values
MySQL query finding values in a comma separated string
I have two tables. One table includes tags, the other table includes posts which have tags in a comma separated string. I need to get all posts with a specific tag id.
I tried this but it didn't work:
SELECT
ab_tags.id,
ab_tags.lang,
ab_tags.tag,
ab_tags.slug,
ab_etkinlik.title,
ab_etkinlik.tag
FROM
ab_tags ,
ab_etkinlik
WHERE
ab_tags.id = 2
ab_tags.id IN (ab_etkinlik.tag)
ab_tags.id is coming from $_get val
ab_etkinlik.tag is a string like "2,4,8,20,48"
thanks in advance.