thesavior
06-05-2006, 05:18 PM
this is my code:
$biggestreferer = 'SELECT referer, COUNT(*) AS p FROM admin_stats WHERE referer != "" GROUP BY referer ORDER BY p DESC LIMIT 1';
$biggestreferer = mysql_query($biggestreferer) or exit (mysql_error());
$biggestreferer = mysql_result($biggestreferer);
and it is for some reason returning a php error, not a mysql error. Mysql doesn't have a problem with the query and i have tried it in phpmyadmin and it works. Here is my php error:
Warning: Wrong parameter count for mysql_result() in /raid5/home/eli/public_html/newhome/administration/stats.php on line 35
What is the problem with this?
$biggestreferer = 'SELECT referer, COUNT(*) AS p FROM admin_stats WHERE referer != "" GROUP BY referer ORDER BY p DESC LIMIT 1';
$biggestreferer = mysql_query($biggestreferer) or exit (mysql_error());
$biggestreferer = mysql_result($biggestreferer);
and it is for some reason returning a php error, not a mysql error. Mysql doesn't have a problem with the query and i have tried it in phpmyadmin and it works. Here is my php error:
Warning: Wrong parameter count for mysql_result() in /raid5/home/eli/public_html/newhome/administration/stats.php on line 35
What is the problem with this?