Pear DB and MySQL?

[email protected] ("Winnie")
Newsgroups php.pear
Organization Winnie
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.