Help with msql_fetch_array()
| From: | Matthew Bielecki | Date: | Wed, 24 Jul 2002 16:34:10 +0000 |
| Subject: | Help with msql_fetch_array() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-109328@lists.php.net to get a copy of this message | ||
I have a couple of scripts that fail with the error of:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in...
I'm new to both SQL and PHP and I'm wondering if I have some setting
turned off or what.
Here's the piece of code that is failing (the second line fails):
$result = mysql_db_query($dbname, "SELECT * FROM tablename ORDER BY id");
$row = mysql_fetch_array($result);
Thanks for your help in advance!!