I'm changing a database so that some details can be in multiple categories rather than just one.
The category ids are stored in a field separated by commas.
I currently have
$query = "SELECT name FROM contacts WHERE catid = '$id'"; where $id is a single id number.
That works fine if the contact is only in one category, however the catid field contains say 4,7,23,102 and I try to retrieve data for contacts with catid 23 it won't find it
I've tried using LIKE and CONTAINS but neither work.