This is database dependent, so it's really depends. You can't expect for it to work the same on all db's. select coutn(*) ... or keeping a counter is the best way.
Ilya -----Original Message----- From: Perl DBI To: [EMAIL PROTECTED] Sent: 11/9/01 8:40 AM Subject: Re: Re: $sth->rows im using postgres and $sth->rows is working well. [EMAIL PROTECTED] writes: >Depend on the driver and underlying DBMS. Safest is to use select >count(*). > >Perl DBI wrote: >> >> would anyone here knows the alternative way of getting the number of >rows >> in a select statement without using $sth->rows or "select count(*) >> from..."? >> >> or is it ok if i'll just use $sth->rows? >
