RE: [PHP] Supplied argument is not a valid MySQL result resource
| From: | Mark Roedel | Date: | Thu, 08 Nov 2001 16:17:54 +0000 |
| Subject: | RE: [PHP] Supplied argument is not a valid MySQL result resource | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73904@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Dan McCullough [mailto:McWC@rocketmail.com]
> Sent: Thursday, November 08, 2001 9:43 AM
> To: PHP General List
> Subject: [PHP] Supplied argument is not a valid MySQL result resource
>
>
> Why isn't this a valid argument, does it have to do with the
> AND statement?
As several people have pointed out, depending on the values of $id and
$gi it might be helpful to get quotes around those variables in your
query, and checking your column and table names, as well as verifying
that you are in fact successfully connected to the database would be
good ideas.
When troubleshooting this sort of thing, the mysql_error() function can
sometimes provide more insight into where, exactly, things have gone
screwy. If you change your mysql_query line to read
$resultf = mysql_query($sqlf) or die (mysql_error());
does the resulting output say anything helpful?
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for he shall never cease
LeTourneau University | to be entertained."
Longview, Texas, USA | -- John Powell