diff options
author | David M <davidmj@users.sourceforge.net> | 2006-05-05 22:06:17 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-05-05 22:06:17 +0000 |
commit | 3d2a45ab049606701172c11552aa0c1006d2fbf1 (patch) | |
tree | ea65a291ac3901d723f33446c54e449e3218ea13 /phpBB/includes/db/postgres.php | |
parent | b6ffae82b938eb3c40395234f14d79b53ba003c4 (diff) | |
download | forums-3d2a45ab049606701172c11552aa0c1006d2fbf1.tar forums-3d2a45ab049606701172c11552aa0c1006d2fbf1.tar.gz forums-3d2a45ab049606701172c11552aa0c1006d2fbf1.tar.bz2 forums-3d2a45ab049606701172c11552aa0c1006d2fbf1.tar.xz forums-3d2a45ab049606701172c11552aa0c1006d2fbf1.zip |
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
Diffstat (limited to 'phpBB/includes/db/postgres.php')
-rw-r--r-- | phpBB/includes/db/postgres.php | 15 |
1 files changed, 10 insertions, 5 deletions
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); } @@ -179,6 +175,15 @@ class dbal_postgres extends dbal } /** + * Build db-specific query data + * @private + */ + function _sql_custom_build($stage, $data) + { + return $data; + } + + /** * Build LIMIT query */ function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0) |