View Single Post
  #1 (permalink)  
Old 12-01-08, 08:07 PM
richardhotscript richardhotscript is offline
New Member
 
Join Date: Nov 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
php/mysql question

Hi guys

I have a mysql question. here's my problem.

I have a table with a column that contains two IDs from a separate table.
the IDs are separated by commas like this
1.bmp

Now these two IDs are located in separate table so I made my query like this:
$sql=mysql_query("select * from tb_client_category where id like '%$id%' ");

instead of returning only 110 and 52 it return these IDs 110,52 and 1 when it should ony be 110 and 52. Can you guys help fix this? Is there I can fix this without modifying the structure of my table?

Thanks
Reply With Quote