aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/dbal.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db/dbal.php')
-rw-r--r--phpBB/includes/db/dbal.php17
1 files changed, 3 insertions, 14 deletions
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index 2d8d2e7624..02072c1c60 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -225,17 +225,7 @@ class dbal
case 'SELECT':
case 'SELECT_DISTINCT';
- if ($query == 'SELECT_DISTINCT')
- {
- $sql .= 'SELECT DISTINCT';
- }
- else
- {
- $sql .= 'SELECT';
- }
-
- $sql .= ' ' . $array['SELECT'];
- $sql .= ' FROM ';
+ $sql = str_replace('_', ' ', $query) . ' ' . $array['SELECT'] . ' FROM ';
$table_array = array();
foreach ($array['FROM'] as $table_name => $alias)
@@ -270,6 +260,7 @@ class dbal
break;
}
+
return $sql;
}
@@ -316,7 +307,7 @@ class dbal
{
$this->sql_transaction('rollback');
}
-
+
if (strlen($message) > 1024)
{
// We need to define $msg_long_text here to circumvent text stripping.
@@ -487,8 +478,6 @@ class dbal
$this->_sql_report($mode, $query);
-// $this->num_queries['cache']++;
-
break;
case 'record_fromcache':