![]() |
![]()
| ![]() |
![]()
NAMETeng::Plugin::SQLPager - Paginate with SQL SYNOPSISpackage My::DB; use parent qw/Teng/; __PACKAGE__->load_plugin(qw/SQLPager/); # in your application $db->search_by_sql_with_pager( q{SELECT * FROM member ORDER BY id DESC}, [], {page => 1, rows => 20} ); DESCRIPTIONThis module searches database by SQL with paginate. search_by_sql_with_pager method adds LIMIT clause automatically. ARGUMENTS FOR search_by_sql_with_pagerYou can pass arguments as following. "$db->search_by_sql_with_pager($sql, $binds, $opt[, $table_name]);"
LIMITATIONSThis module does not work with Oracle since Oracle does not support limit clause.
|