RE: [PHP] Php error with MySql

From: Date: Thu, 06 Jan 2005 19:12:27 +0000
Subject: RE: [PHP] Php error with MySql
Groups: php.general 
Request: Send a blank email to php-general+get-205765@lists.php.net to get a copy of this message
[snip] I get the following error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/wilmail/public_html/elblog.php on line 7 &n=& //error ends here with the following bit of code $qResult = mysql_query ("SELECT * FROM blog_entries ORDER BY id DESC"); $nRows = mysql_num_rows($qResult); $rString ="&n=".$nRows; If I am just naming a variable how is the argument not valid? [/snip] Perhaps your query failed, but you've got no error checking.

« previous php.general (#205765) next »