Changed to Php5.3 and receiving these warning messages,
Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\wamp\www\050505\fnc2.php on line 322
I think it’s saying that ($sql_res) needs to be a resource and not a boolean on line 322.
function get_cat_count($ct)
{
// This function return how many ads exist in the specified category
global $cat_fields, $table_ads, $page, $adsonpage;
$sql_query=“select count(idnum) from $table_ads where
catname=‘$ct’ and visible=1”;
$sql_res=mysql_query(“$sql_query”);
$row=mysql_fetch_row($sql_res); // line 322
$count=$row[0];
return $count;
}
How do I create a resource from this boolean?
Thanks for your replies,