mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02:00
git-svn-id: file:///svn/phpbb/trunk@2084 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -123,7 +123,7 @@ class sql_db
|
|||||||
{
|
{
|
||||||
$this->num_queries++;
|
$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 )
|
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) )
|
if( preg_match("/^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)/is", $this->last_query_text[$query_id], $tablename) )
|
||||||
{
|
{
|
||||||
$query = "SELECT last_value
|
$query = "SELECT currval('" . $tablename[1] . "_id_seq') AS last_value";
|
||||||
FROM " . $tablename[1] . "_id_seq";
|
|
||||||
$temp_q_id = @pg_exec($this->db_connect_id, $query);
|
$temp_q_id = @pg_exec($this->db_connect_id, $query);
|
||||||
if( !$temp_q_id )
|
if( !$temp_q_id )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user