Now, I've MySQL field called `catgegory_ids`, if one row contains (1,5,23,45) . how can I make a search if any of these categories (1,5) are found ??
I thought of making the following:
PHP Code:
$category_ids = array(1,2,5,10);
foreach($category_ids AS $category_id) {
$query .= "OR `category_ids` LIKE `%" . $category_id , "%' ";
}
But I feel it's stupid way !