mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 08:17:47 +02:00
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
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user