Paul DuBois wrote:
> Use of $sth->rows in Perl DBI is discouraged for obtaining a row count
> from SELECT statements, do to the fact that not all drivers return the
> row count reliably until all the rows have been fetched (if at all).
> Instead, the docs recommend counting the rows as you fetch them.
>
> Does the same apply to Ruby DBI?
Statement#rows does not return the number of rows in the result set!
Instead it returns the RPC (Row Processed Count) which is only valid
for DELETE/UPDATE.
But depending on the DBD it may also work with SELECT statements.
Regards,
Michael
|