Re: DB::limitQuery on PostgreSQL -- bugfix

From: Date: Wed, 09 Apr 2003 05:10:14 +0000
Subject: Re: DB::limitQuery on PostgreSQL -- bugfix
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15053@lists.php.net to get a copy of this message
On Tue, Apr 08, 2003 at 11:05:15PM -0400, boris wrote: > DB::limitQuery fails on PostgreSQL due to using invalid LIMIT syntax. > Note that this is on PostgreSQL version 7.3.2, and pgsql.php is version > 1.5. > > The one-liner patch is: > --- pgsql.php.orig Wed Apr 9 03:02:52 2003 > +++ pgsql.php Wed Apr 9 02:59:59 2003 > @@ -556,7 +556,7 @@ > > function modifyLimitQuery($query, $from, $count) > { > - $query = $query . " LIMIT $count, $from"; > + $query = $query . " LIMIT $count OFFSET $from"; > return $query; > } It looks like Stig fixed that in revision 1.13 of that file (on January 9): http://cvs.php.net/diff.php/pear/DB/DB/pgsql.php?login=2&r1=1.12&r2=1.13&ty=u -- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

« previous php.pear.dev (#15053) next »