Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: SQL Paging with Perl

by LTjake (Prior)
on Oct 05, 2006 at 13:38 UTC ( #576529=note: print w/replies, xml ) Need Help??


in reply to SQL Paging with Perl

You could try using SQL::Abstract::Limit. It has a way to generate queries that will only retrieve the page of results you're looking for. MSSQL would require the use of the Top dialect: (see the docs)

use SQL::Abstract::Limit; my $sql = SQL::Abstract::Limit->new( limit_dialect => 'Top' ); # generate SQL: my ( $stmt, @bind ) = $sql->select( $table, \@fields, \%where, \@order +, $limit, $offset ); # Then, use these in your DBI statements my $sth = $dbh->prepare( $stmt ); $sth->execute( @bind );

--
"Go up to the next female stranger you see and tell her that her "body is a wonderland."
My hypothesis is that she’ll be too busy laughing at you to even bother slapping you.
" (src)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://576529]
help
Chatterbox?
[Discipulus]: Tomas in greek ~140Ad
[Discipulus]: also the 'today bred' was probably 'tomorrow's bred'
[LanX]: Novum Testamentum Graece
[erix]: "give us today our bread from tomorrow" -- that's not going to fly
[choroba]: "for tomorrow"
[Discipulus]: Let's perl: from cpan website how can thou/you tell how many namespaces are beyond App::* ?
[choroba]: Map of CPAN
[LanX]: cpan serach?
[Discipulus]: about bred: 'let our bred levitate (well)'
[Discipulus]: I love maps!

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-11-23 20:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (338 votes). Check out past polls.

    Notices?