cvs commit: p5ee/P5EEx/Blue/P5EEx/Blue/Repository DBI.pm

[email protected] (Stephen Adkins)
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
cvsuser     04/03/04 14:42:28

  Modified:    P5EEx/Blue/P5EEx/Blue/Repository DBI.pm
  Log:
  added support for the 'limit' clause in MySQL
  
  Revision  Changes    Path
  1.31      +5 -2      p5ee/P5EEx/Blue/P5EEx/Blue/Repository/DBI.pm
  
  Index: DBI.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/P5EEx/Blue/P5EEx/Blue/Repository/DBI.pm,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -w -r1.30 -r1.31
  --- DBI.pm	18 Feb 2004 13:34:23 -0000	1.30
  +++ DBI.pm	4 Mar 2004 22:42:27 -0000	1.31
  @@ -1,13 +1,13 @@
   
   ######################################################################
  -## File: $Id: DBI.pm,v 1.30 2004/02/18 13:34:23 spadkins Exp $
  +## File: $Id: DBI.pm,v 1.31 2004/03/04 22:42:27 spadkins Exp $
   ######################################################################
   
   use P5EEx::Blue::P5EE;
   use P5EEx::Blue::Repository;
   
   package P5EEx::Blue::Repository::DBI;
  -$VERSION = do { my @r=(q$Revision: 1.30 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r};
  +$VERSION = do { my @r=(q$Revision: 1.31 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r};
   
   @ISA = ( "P5EEx::Blue::Repository" );
   
  @@ -959,6 +959,9 @@
           $sql .= "order by\n   " . join(",\n   ",@order_by_dbexpr) . "\n";
       }
   
  +    if ($endrow && $self->{dbidriver} eq "mysql") {
  +        $sql .= "limit $endrow\n";
  +    }
       ############################################################
       # return the SQL statement
       ############################################################
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.