Pear DB and MySQL?

From: Date: Mon, 05 Feb 2001 14:16:46 +0000
Subject: Pear DB and MySQL?
Groups: php.pear 
Request: Send a blank email to php-pear+get-1260@lists.php.net to get a copy of this message
Hi, I need some help with using PEAR DB with MYSQL. I would like to know how to get the number of rows returned by a resultset! there are two functions: numCols and numRows in the class for postgres, but only numCols for mysql! When I try to write my own function for numRows as follows: ---------------------- function numRows($result) { $rows = mysql_num_rows($result); if (!$rows) { return $this->raiseError($this->errorCode(mysql_errno($this->connection))); } return $rows; } ---------------------- I put the above function in MYSQL.PHP but it does not work. Can someone tell me how I can add a function for the MYSQL database, or if not, then how to SUBCLASS the file and use my own functions? Is there anyone who has developed more classes for the PEAR DB? Please help! I would appreciate any advice/pointers! Hopefully, Winnie --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.230 / Virus Database: 111 - Release Date: 25-Jan-01

« previous php.pear (#1260) next »