RE: [PHP] warning:supplied argument to mysql_fetch_array not vali d resource type?
| From: | Ford, Mike [LSS] | Date: | Wed, 07 Apr 2004 15:56:41 +0000 |
| Subject: | RE: [PHP] warning:supplied argument to mysql_fetch_array not vali d resource type? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-182663@lists.php.net to get a copy of this message | ||
On 07 April 2004 15:56, Andy B wrote:
> i have this query set:
> $EditQuery="select * from $EventsTable where Id='$edit'";
> $query=mysql_query($EditQuery)||die(mysql_error());
Don't use || for this, use or -- they have different precedence, and it *matters*.
> //later in the code i have this:
> while($old=mysql_fetch_array($query)){
> //do stuff
> }
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211