I am building an AJAX call which passes an array of variables (ids) through to a function which will then query a database to return rows if this ids exist in their 'catid' cell.
I know how to use an array to use an 'IN' MYSQL command but in this instance there are multiple ids stored in a cell for rows, seperated by a comma. This is stored as a varchar. Is there any way I can loop through the individual ids stored in a rows categories cell?
Here is a screenshot of an example row from the database. I have highlighted the 'catid' cell for rows. As you can see, a row can be part of many categories, with these category id's seperated by a comma)...
18,26,32
is a string in your database that you're trying to query. – Machavity♦FIND_IN_SET()
– Funk Forty Niner