On Tue, 30 Mar 2004 11:04:49 -0600
Andrew Gaffney <[EMAIL PROTECTED]> wrote:

> Is there a way to find out how many records were returned with a DBI query? There's 
> the 
> obvious counting each record as you fetch it, but I need the count before I start 
> going 
> through them.
>

Hi, 
I found this in perldoc  DBD::[drivername] - I use DBD::Pg as my database is 
postgresql. 
You might want to look at your DBD documentation, as it may have something specific to 
how the DBD/DBI interface can access the row count infomation for you.

rs.
 
rows
           $rv = $sth->rows;

           Supported by the driver as proposed by DBI. In con-
           trast to many other drivers the number of rows is
           available immediately after executing the statement.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to