I wonder if there is a big difference between those 2 functions, is one faster or more efficient than other ?!
function nb1($cat_id)
{
$query = "SELECT COUNT(site_id) FROM site_list WHERE cat_id = '$cat_id'";
$result = mysql_query($query);
return mysql_result($result, 0, 0);
}
function nb2($cat_id)
{
$query = "SELECT site_id FROM site_list WHERE cat_id = '$cat_id'";
$result = mysql_query($query);
return mysql_num_rows($result);
}