Re: Php error with MySql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: "Wil Hitchman" <wil.hitchman@xxxxxxxxxxxx>
> 
> 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;

Your query has failed for some reason, so $qResult is not a valid result set. Use mysql_error() to find out why. 

---John Holmes...

UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux