[nycphp-talk] warning - mysql resource
pl at eskimo.com
Wed Aug 27 14:59:47 EDT 2003
the code that is triggering the warning is:
$row = mysql_fetch_array($result) or trigger_error("MySQL error nr
It is triggering the warning:
"Warning: Supplied argument is not a valid MySQL result resource in
c:\program files\apache\htdocs\books\confirm.php on line 16
Notice: MySQL error nr 0: in c:\program
files\apache\htdocs\books\confirm.php on line 16"
The mysql_query function actually gives no warnings or errors. Sorry about
----- Original Message -----
From: "Chris Snyder" <csnyder at chxo.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Wednesday, August 27, 2003 2:38 PM
Subject: Re: [nycphp-talk] warning - mysql resource
> Peter Lehrer wrote:
> > I am performing 2 mysql_query statements in one program and the second
> > doesn't return a
> > "valid MySQL result resource."
> > Are you suppose to reconnect to the database with each mysql query?
> No, you can definitely use the same db connection for as many queries as
> you like.
> Take a look at the mysql_error() function, you could use it to see what
> is going wrong if you don't get a result from mysql_query().
> talk mailing list
> talk at lists.nyphp.org
More information about the talk