mysql_result() error happening all of a sudden

PORKED

New Member
I recently rebuilt my website and now I'm getting this error:Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/xx/public_html/asdf.com/comsel.php on line 28Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/xx/public_html/asdf.com/comsel.php on line 29Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/xx/public_html/asdf.com/comsel.php on line 30Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/xx/public_html/asdf.com/comsel.php on line 31Those lines are as follows:\[code\]mysql_connect($dbhost,$dbuser,$dbpass)or die("Error: Failed to connect to database");mysql_select_db($dbname)or die("Error: Failed to select databse");$query = "SELECT * FROM foxlose ORDER BY RAND ( ) LIMIT 1";$result = mysql_query($query);$title = mysql_result($result,$i,"title");$link = mysql_result($result,$i,"link");$nomen = mysql_result($result,$i,"name");$text = mysql_result($result,$i,"text");mysql_close();\[/code\]The last four lines before mysql_close(); are lines 28-31. Only here's the thing: those lines were the same in the old version of my site, and they worked. I can't figure out what's changed. The code also works fine when I use my computer as a server and host it locally. Any idea what this error is trying to tell me?Edit: Added all mysql in the document.
 
Back
Top