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/mysqli.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'phpBB/includes/db/mysqli.php') diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php index 137ca39591..0233c7092f 100644 --- a/phpBB/includes/db/mysqli.php +++ b/phpBB/includes/db/mysqli.php @@ -284,6 +284,21 @@ class dbal_mysqli extends dbal { return @mysqli_real_escape_string($this->db_connect_id, $msg); } + + /** + * Build db-specific query data + * @private + */ + function _sql_custom_build($stage, $data) + { + switch ($stage) + { + case 'FROM': + $data = '(' . $data . ')'; + break; + } + return $data; + } /** * return sql error array -- cgit v1.2.1