aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-07-02 23:11:21 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-07-02 23:11:21 +0200
commitfe1f21d1a55ac15b278d99c3a73a8e3424a38fd5 (patch)
treee3ed655aaaadcad8452cc1ddd061adbfaf3e300e
parentad9d6506594f90ac7c6cdf20a5718d28042059c9 (diff)
downloadforums-fe1f21d1a55ac15b278d99c3a73a8e3424a38fd5.tar
forums-fe1f21d1a55ac15b278d99c3a73a8e3424a38fd5.tar.gz
forums-fe1f21d1a55ac15b278d99c3a73a8e3424a38fd5.tar.bz2
forums-fe1f21d1a55ac15b278d99c3a73a8e3424a38fd5.tar.xz
forums-fe1f21d1a55ac15b278d99c3a73a8e3424a38fd5.zip
[ticket/10942] Use ANSI SQL standard || in dbal.php
PHPBB3-10942
-rw-r--r--phpBB/includes/db/dbal.php2
-rw-r--r--phpBB/includes/db/firebird.php8
-rw-r--r--phpBB/includes/db/mysql.php8
-rw-r--r--phpBB/includes/db/mysqli.php8
-rw-r--r--phpBB/includes/db/postgres.php8
-rw-r--r--phpBB/includes/db/sqlite.php8
6 files changed, 17 insertions, 25 deletions
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index 8dbcd73b58..fded27a001 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -311,7 +311,7 @@ class dbal
*/
function sql_concatenate($expr1, $expr2)
{
- return 'CONCAT(' . $expr1 . ', ' . $expr2 . ')';
+ return $expr1 . ' || ' . $expr2;
}
/**
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
index d6b16d0342..7709e8fdf5 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/firebird.php
@@ -111,14 +111,6 @@ class dbal_firebird extends dbal
}
/**
- * {@inheritDoc}
- */
- function sql_concatenate($expr1, $expr2)
- {
- return $expr1 . ' || ' . $expr2;
- }
-
- /**
* SQL Transaction
* @access private
*/
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php
index eb38e3e913..3cda5cc1e0 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/includes/db/mysql.php
@@ -120,6 +120,14 @@ class dbal_mysql extends dbal
}
/**
+ * {@inheritDoc}
+ */
+ function sql_concatenate($expr1, $expr2)
+ {
+ return 'CONCAT(' . $expr1 . ', ' . $expr2 . ')';
+ }
+
+ /**
* SQL Transaction
* @access private
*/
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php
index 4210a58002..e3828d9599 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/includes/db/mysqli.php
@@ -123,6 +123,14 @@ class dbal_mysqli extends dbal
}
/**
+ * {@inheritDoc}
+ */
+ function sql_concatenate($expr1, $expr2)
+ {
+ return 'CONCAT(' . $expr1 . ', ' . $expr2 . ')';
+ }
+
+ /**
* SQL Transaction
* @access private
*/
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index a31181b4d4..bf22cffafa 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -155,14 +155,6 @@ class dbal_postgres extends dbal
}
/**
- * {@inheritDoc}
- */
- function sql_concatenate($expr1, $expr2)
- {
- return $expr1 . ' || ' . $expr2;
- }
-
- /**
* SQL Transaction
* @access private
*/
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php
index 6eb77e5a70..86bfa75a13 100644
--- a/phpBB/includes/db/sqlite.php
+++ b/phpBB/includes/db/sqlite.php
@@ -73,14 +73,6 @@ class dbal_sqlite extends dbal
}
/**
- * {@inheritDoc}
- */
- function sql_concatenate($expr1, $expr2)
- {
- return $expr1 . ' || ' . $expr2;
- }
-
- /**
* SQL Transaction
* @access private
*/