I have a numerical field called category_id
in my table. I want to do something like this.
$ids=implode(',',$id_array);
$sql="SELECT * FROM myTbl WHERE IN(category_id,'$ids')";
Which should output something like:
SELECT * FROM myTbl WHERE IN(category_id,'1,2,3,4,5,6');
Is this possible and am I using the right syntax for this? Is there a better way to do this?