I have a string of values like :
$cat = "1,5,6,8,9";
now I would like to use that variable in WHERE clause. how do I do it ?
"select category from test where category...?"
I am using below code but I get null from number_of_result variable :
$array_of_cat = explode(",",$cat);
if($number_of_result == 0){
$mresult = mysql_query("select * from books where
GoodName like '%$title%' and GroupCode in ($array_of_cat) ");
$number_of_result = mysql_num_rows($mresult);
}