my $pager = $rs->pager;
and then to get the total page count do this:
my $total = $pager->total_entries;
http://search.cpan.org/~mstrout/DBIx-Class-0.06000/lib/DBIx/Class/Manual/Cookbook.pod#Paged_results
http://search.cpan.org/~lbrocard/Data-Page-2.00/lib/Data/Page.pm
On 4/10/06, Jesse Sheidlower <[EMAIL PROTECTED]> wrote:
I'm dynamically constructing my $rs search statements, and including
"page" and "rows" values in my attribute hash, for paged results.
In my display template, I'd like to do something like "25837
records found; displaying 50-100". However, when I call
$rs->count() to get the count, I'm only getting the value of
"rows" or less; that is, I get the count of my particular page
of the resultset, rather than on the complete search. This
despite the fact that the SQL I get from running under
DBIX_CLASS_STORAGE_DBI_DEBUG=1 does not specify any kind of
limit.
How do I get the full count from my resultset?
Jesse Sheidlower
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
