DB::limitQuery on PostgreSQL -- bugfix
| From: | boris | Date: | Wed, 09 Apr 2003 03:05:15 +0000 |
| Subject: | DB::limitQuery on PostgreSQL -- bugfix | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-15050@lists.php.net to get a copy of this message | ||
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;
}
-Andrew