Possible Duplicate:
mysql check if numbers are in a comma separated list
Note: Please don't tell me to normalize my database
Ok so what I need is fetch only rows if the id is present in another table which are comma separated...But am having no idea how to select
table1
script_id | name | user_id
+-------------------------+
33 demo 256
table2
has_access| name |user_id
+-------------------------+
33,34,56 demo 256
So I want the row to return from table1
only if the id exists inside the table2
has_access
column, moreover I need exact, so if the ID gets 33, or 333 should be different...I need the exact value match