Re: Question about PEAR DB (mysql)

From: Date: Sun, 15 Apr 2001 09:01:26 +0000
Subject: Re: Question about PEAR DB (mysql)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-51599@lists.php.net to get a copy of this message
["Chris Newbill" <cnewbill@onewest.net>] > There are two functions query and simpleQuery...query CAN return a DB_Result > object, simpleQuery returns a resource ID. When you call fetchRow() with a > DB_Result, it fails because it expects simply a resource and doesn't check > for a DB_Result object. > > It's a simple change to make this work. Is there some magical and > mysterious reason this is so? The DB_result object has a fetchRow method that is what you are supposed to use. This method again calls for example DB_mysql::fetchRow. So if you have a result object, call fetchRow in the object, if you have a resource, call fetchRow in the connection object. - Stig -- Stig Sæther Bakken <ssb@fast.no> Fast Search & Transfer ASA, Trondheim, Norway

« previous php.dev (#51599) next »