Re: Call to undefined method DB_Error::fetchRow() ?

From: Date: Thu, 16 Dec 2004 17:21:08 +0000
Subject: Re: Call to undefined method DB_Error::fetchRow() ?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16274@lists.php.net to get a copy of this message
Jacques Nunes wrote:
This code runing ok with MySql 4.018 / PHP4 $dsnMySql = "mysql://***:***@localhost/framework"; $dbMySql = DB::connect($dsnMySql); $resultMysql = $dbMySql->query("SELECT * FROM ..."); $rowMysql = $resultMysql->fetchRow(DB_FETCHMODE_OBJECT); But with MySql 4.17/PHP5 $dsnMySql = "mysqli://***:***@localhost/framework"; $dbMySql = DB::connect($dsnMySql); $resultMysql = $dbMySql->query("SELECT * FROM ..."); $rowMysql = $resultMysql->fetchRow(DB_FETCHMODE_OBJECT); Fatal error: Call to undefined method DB_Error::fetchRow() in C:\desenvolvimento\framework\bin\modules\ReplicaSrh\ReplicaSrhReplicate.php on line 105 It´s a bug?
Not sure as I still don't play php5, but it's obvius that DB_Error doesn't have the method fetchRow(). Check that your dsn string is valid --I suggest $dbMySql->isError().

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