in sql:
"SELECT COUNT(*) FROM people"doing the same in perl would be horribly inefficient, unless you're going to do something else with the results afterwards. here's a minimal version anyway, in case for some reason select count isn't possible:
my $records = $dbh->selectcol_arrayref('SELECT location FROM people'); my $peoplecount = scalar(@$records);
update: curses... redundant again.
In reply to Re: How to fetch the size of the resultset from a DBI query?
by thpfft
in thread How to fetch the size of the resultset from a DBI query?
by Loc_Nar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |