Re: Php error with MySql
| From: | Janet Valade | Date: | Thu, 06 Jan 2005 21:19:03 +0000 |
| Subject: | Re: Php error with MySql | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-205779@lists.php.net to get a copy of this message | ||
Wil wrote:
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?It's not valid because your query didn't execute as you expected. So, there is no result resource. I would suggest you use mysql_error() after your query to see what's wrong. Janet -- Janet Valade -- janet.valade.com