From 3d2a45ab049606701172c11552aa0c1006d2fbf1 Mon Sep 17 00:00:00 2001 From: David M Date: Fri, 5 May 2006 22:06:17 +0000 Subject: I hope nothing broke! - Added a query builder, it is currently only used for complex queries that involve a FROM clause with two tables and a left join - Changed some function calls in the DBAL - Made the viewtopic queries nicer git-svn-id: file:///svn/phpbb/trunk@5885 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/db/postgres.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'phpBB/includes/db/postgres.php') diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index d9e8bc2bfa..eb5f2d17e8 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -127,10 +127,6 @@ class dbal_postgres extends dbal { global $cache; - if (strpos($query, 'SELECT') === 0 && strpos($query, 'FROM (') !== false) - { - $query = preg_replace('#FROM \(([^)]+)\)\s#', 'FROM \1 ', $query); - } // EXPLAIN only in extra debug mode if (defined('DEBUG_EXTRA')) @@ -145,7 +141,7 @@ class dbal_postgres extends dbal { $this->num_queries++; - if (($this->query_result = @pg_exec($this->db_connect_id, $query)) === false) + if (($this->query_result = @pg_query($this->db_connect_id, $query)) === false) { $this->sql_error($query); } @@ -178,6 +174,15 @@ class dbal_postgres extends dbal return ($this->query_result) ? $this->query_result : false; } + /** + * Build db-specific query data + * @private + */ + function _sql_custom_build($stage, $data) + { + return $data; + } + /** * Build LIMIT query */ -- cgit v1.2.1