Class::DBI::Pager::mysql feedback request
[prev]
[thread]
[next]
[Date index for 2004/12/28]
I just created a Mysql specific pager class that I would appreciate
feedback on. It is meant to only work with Mysql 4.0 and above,
mainly because I wanted to take advantage of 4.0's SQL_CALC_FOUND_ROWS
/ FOUND_ROWS functionality in order to minimize the amount of records
I retrieve from the database.
http://www.suspenda.com/Class-DBI-Pager-mysql-0.01.tar.gz
The general synopsis is:
package CD;
use base qw(Class::DBI);
__PACKAGE__->set_db(...);
use Class::DBI::Pager::mysql; # just use it
use Class::DBI::AbstractSearch; # optional plugin
use Class::DBI::Plugin::RetrieveAll ; # optional plugin
# then, in client code!
package main;
use CD;
my $pager = CD->mysql_pager(20, 1); # ($items_per_page, $current_page)
my $disks = $pager->retrieve_all;
P. S. I'm not sure what do about including a test.pl script with it.
It seems like most mysql specific modules I download and install
always fail because of permission problems. If you know of a good
example I could imitate, let me know.
|
(message missing)
|
|
|
Class::DBI::Pager::mysql feedback request
Juan Camacho 15:31 on 28 Dec 2004
|