From 17205b6e6201af0e4dea338009be794fddbc1712 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Mon, 21 Nov 2005 15:55:17 +0000 Subject: #36352: Don't prefix temporary table names after all. #36658: Make search query pgsql compatible. --- includes/database.mysql.inc | 6 +++--- includes/database.pgsql.inc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'includes') diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc index 21f763b8a..8f96dc3bb 100644 --- a/includes/database.mysql.inc +++ b/includes/database.mysql.inc @@ -268,8 +268,8 @@ function db_query_range($query) { * printf() syntax. Instead of a variable number of query arguments, you may * also pass a single array containing the query arguments. * @param $table - * The name of the temporary table to select into. This name will be - * prefixed for compatibility reasons (even though there is no risk of collision)@. + * The name of the temporary table to select into. This name will not be + * prefixed as there is no risk of collision. * @return * A database query result resource, or FALSE if the query was not executed * correctly. @@ -278,7 +278,7 @@ function db_query_temporary($query) { $args = func_get_args(); $tablename = array_pop($args); - $query = preg_replace('/^SELECT/i', 'CREATE TEMPORARY TABLE {'. $tablename .'} SELECT', db_prefix_tables($query)); + $query = preg_replace('/^SELECT/i', 'CREATE TEMPORARY TABLE '. $tablename .' SELECT', db_prefix_tables($query)); if (count($args) > 1) { // Check for array (alternative syntax). if (is_array($args[1])) { diff --git a/includes/database.pgsql.inc b/includes/database.pgsql.inc index 8a1e06ebf..a25f86baf 100644 --- a/includes/database.pgsql.inc +++ b/includes/database.pgsql.inc @@ -253,8 +253,8 @@ function db_query_range($query) { * printf() syntax. Instead of a variable number of query arguments, you may * also pass a single array containing the query arguments. * @param $table - * The name of the temporary table to select into. This name will be - * prefixed for compatibility reasons (there is no risk of collision). + * The name of the temporary table to select into. This name will not be + * prefixed as there is no risk of collision. * @return * A database query result resource, or FALSE if the query was not executed * correctly. @@ -263,7 +263,7 @@ function db_query_temporary($query) { $args = func_get_args(); $tablename = array_pop($args); - $query = preg_replace('/^SELECT/i', 'CREATE TEMPORARY TABLE {'. $tablename .'} AS SELECT', db_prefix_tables($query)); + $query = preg_replace('/^SELECT/i', 'CREATE TEMPORARY TABLE '. $tablename .' AS SELECT', db_prefix_tables($query)); if (count($args) > 1) { // Check for array (alternative syntax). if (is_array($args[1])) { -- cgit v1.2.3