aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/db
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-02-11 12:46:18 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-02-11 12:46:18 +0000
commitfb69e51741f8ddf2b04523cc04673f9fa707b1ea (patch)
treeae0e0018df796815fd40552cb96c46081569532b /phpBB/db
parentd9616cbe16c48f3350e98c74b3a3a4dfd9c24864 (diff)
downloadforums-fb69e51741f8ddf2b04523cc04673f9fa707b1ea.tar
forums-fb69e51741f8ddf2b04523cc04673f9fa707b1ea.tar.gz
forums-fb69e51741f8ddf2b04523cc04673f9fa707b1ea.tar.bz2
forums-fb69e51741f8ddf2b04523cc04673f9fa707b1ea.tar.xz
forums-fb69e51741f8ddf2b04523cc04673f9fa707b1ea.zip
Fix bugs #515461 and #515460, limit and nextid issues.
git-svn-id: file:///svn/phpbb/trunk@2084 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/db')
-rw-r--r--phpBB/db/postgres7.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/db/postgres7.php b/phpBB/db/postgres7.php
index a9ae5926e5..84b26c66b9 100644
--- a/phpBB/db/postgres7.php
+++ b/phpBB/db/postgres7.php
@@ -123,7 +123,7 @@ class sql_db
{
$this->num_queries++;
- $query = preg_replace("/LIMIT ([0-9]+),([ 0-9]+)/", "LIMIT \\2, \\1", $query);
+ $query = preg_replace("/LIMIT ([0-9]+),([ 0-9]+)/", "LIMIT \\2 OFFSET \\1", $query);
if( $transaction == BEGIN_TRANSACTION )
{
@@ -342,8 +342,7 @@ class sql_db
{
if( preg_match("/^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)/is", $this->last_query_text[$query_id], $tablename) )
{
- $query = "SELECT last_value
- FROM " . $tablename[1] . "_id_seq";
+ $query = "SELECT currval('" . $tablename[1] . "_id_seq') AS last_value";
$temp_q_id = @pg_exec($this->db_connect_id, $query);
if( !$temp_q_id )
{