Re: warning:supplied argument to mysql_fetch_array not valid resource type?
| From: | Andy B | Date: | Wed, 07 Apr 2004 15:16:00 +0000 |
| Subject: | Re: warning:supplied argument to mysql_fetch_array not valid resource type? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182656@lists.php.net to get a copy of this message | ||
>[snip]
>i have this query set:
>$EditQuery="select * from $EventsTable where >Id='$edit'";
>$query=mysql_query($EditQuery)||die(mysql_error());
>[/snip]
>
>You forgot the connection string arguement in >mysql_query
even after putting in my standard mysql_connect(.....) stuff it still fails
now the interesting thing here: normally i can do any mysql valid functions
in php and append "||die(//whatever);" after it... but for some really odd
reason mysql_query has a fit when i do that and for some reason it thinks im
appending the litteral string "warning:........" to the query itself...
anybody know why that is or what the deal is... i had to modify the query
set to read:
mysql_connect(...)||die(mysql_error())//works
$EditQuery="select * from $EventsTable where Id='$edit'";
$query=mysql_query($EditQuery);//||die(mysql_error())
//taken out (bug or something??)
mysql_error();//have no clue why its even there it will
//never get ran...
im running php 4.3.3 if it makes any difference on that part