...

View Full Version : Unable to jump to row 0 on MySQL result index 8



coleman
06-27-2011, 04:05 AM
I am getting this error about this script. Can I just change all the zeros to something else?

$site=mysql_result($result,0,"site");
$language=mysql_result($result,0,"language");
$url=mysql_result($result,0,"url");
$b=mysql_result($result,0,"b");
@mysql_free_result($result);

Fumigator
06-27-2011, 06:53 PM
Your resultset is probably empty, resulting in that error. You should check the resultset to see if it's empty first, then fetch data from it if it's not empty.

But I have to ask, why are you not using a function that fetches the entire row at once, such as mysql_fetch_array()? It's much faster with less code.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum