Re: [PHP-PEAR] numrows

[email protected] ("Stig S. Bakken")
Newsgroups php.pear
Organization Fast Search & Transfer
Message-ID <[email protected]>
Antonio Mármol Albert wrote:
> 
> Hello,
> 
> How can I do a numrows with DB PEAR ?

$res = $dbh->query("SELECT foo FROM bar");
$rows = $res->numRows();

However, numRows() is not really supported in all databases, so if you
can re-think your approach so you don't need it, that is generally
recommended.

 - Stig
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.