compare array with coma seperated table fileld
Hello,
I have an array(in php) with id's of cities, like 1 for city1,2 for city2,3 for city3
In the database table field , one particular row contains a coma seperated field which have the name city_id.(varchar) for example ,1,2,3,4,5,6,7 .
Here is my problem. How can I compare the array value with the field value in a single query. I know that, if this php variable is not an array, I can use the keyword 'like' .(example - SELECT * FROM TABLE1 WHERE city_id like '%variablename%') But what I have to with an array? I am using MySQL 4.0.18-nt. Please help me.
Thanking in advance,
From,
Vinod
|