in reply to SQLite: how to get a number of rows from SELECT query
SQLite doesn't seem to have an equivalent of MySQL's FOUND_ROWS feature (though even that is now deprecated in MySQL).
If using DBIx::Class, is an option, it makes this kind of usage simple (at the cost of doing two queries) e.g.
my $cd_rs = $schema->resultset('CD')->search({ year => 2005 }); printf "returned (%s) rows\n", $cd_rs->count; while($cd = $cd_rs->next) { print $cd->title; }
|
---|
In Section
Seekers of Perl Wisdom