Re: DB:: error when using UPDATE on $dbConn->query()

From: Date: Thu, 29 Jul 2004 12:53:41 +0000
Subject: Re: DB:: error when using UPDATE on $dbConn->query()
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13906@lists.php.net to get a copy of this message
On an insert/update query, doesn't ->query(); return true/false instead of a recordset object? *********** REPLY SEPARATOR *********** On 7/28/2004 at 9:35 PM Louie Miranda wrote: >Fatal error: Call to a member function on a non-object in on line 28 > >## start >$activate = $dbConn->query("UPDATE users set activated = '1' where id >= '$aId' and aKey = '$aKey'"); >//$activate = $dbConn->query("select * from users"); > >if (DB::isError($activate) || $activate->numRows() == 0) { >die('Your account could not be activated'); >}; > >print("<p>Your account has been activated!</p>"); >## end > >line 28 on my code is this.. > >if (DB::isError($activate) || $activate->numRows() == 0) { > >i had try to use the select syntax on mysql to this query(), and no >errors found. But when i did use "update" that error occured. > >I have read the manual, but i did not get that i can't use it with static >data. > >Anyway, why is this error appearing? > >-- >Louie Miranda >http://www.axishift.com > >-- >PEAR General Mailing List (http://pear.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- will http://forkmantis.com

« previous php.pear.general (#13906) next »