Jump to content

please correct my mysql query


piyush23424

Recommended Posts

I have comma separated values in table column name cityid(datatype is varchar).

 

Now i want to fetch the records  from that table based upon those ids with pattern matching technique

 

eg. cityid has 3,4,5,10,5,60,2  values.

 

Here each id is reference to different cities.

 

i have tried following query but it didn't worked for me

 

$sql = "Select * from table where cityid like %id%"

 

i think we can do it with pattern matching. please help

 

Thanks

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/237521-please-correct-my-mysql-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.