Re: PHP - MySQL Query...
| From: | Curt Zirzow | Date: | Thu, 14 Aug 2003 14:22:50 +0000 |
| Subject: | Re: PHP - MySQL Query... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159579@lists.php.net to get a copy of this message | ||
* Thus wrote Steven Kallstrom (stevenkallstrom@insightbb.com):
> Hello all...
>
> I'm embarrassed by this one... I think it should work but it isn't...
>
> $query = 'SELECT * FROM cities';
> $result = mysql_query($query);
>
> while ($row = mysql_fetch_row($result)) {
>
> getting this error:
>
> *Warning*: mysql_fetch_row(): supplied argument is not a valid MySQL
> result resource in...
Hmm.. I thought I had replied to this.. anyway, check the output of
mysql_error() after your mysql_query(), mysql_select_db() and
mysql_connect() to see who is cause the query to fail. The sql
syntax appears to be correct.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."