Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Paging using Perl

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


in reply to Paging using Perl

There was a thread not too long ago that was pretty much exactly what you're asking: SQL Paging with Perl

I believe my reply was a suitable response -- use SQL::Abstract::Limit. Here is the snippet i posted in my reply:

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)

Replies are listed 'Best First'.
Re^2: Paging using Perl
by Anonymous Monk on Oct 23, 2006 at 14:09 UTC
    This is as bad as writing a Stored Procedures for Microsoft Sql Server, unless you have a clear example for it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://580035]
help
Chatterbox?
[Corion]: But at least I have a plan of action to move the site to https, played some (free!) VR games with friends and watched the plans for the next German Perl workshop progress ;)
[Corion]: AltSpace VR is amazingly good - highly polished and with some of the games you get for free what you'd pay EUR 20 or EUR 40 otherwise
[Corion]: But maybe it's also due to that I play with friends, which makes a game more enjoyable anyway ;)
[Corion]: Oh - I released a new version of some module, thanks to a pull request. But I don't consider "update Makefile.PL" and "update author tests" as "writing code" ;-D
[marto]: sounds fun, the opposite of my weekend :P

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2017-08-21 09:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (319 votes). Check out past polls.

    Notices?