aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/db/dbal.php12
-rw-r--r--phpBB/includes/db/firebird.php8
-rw-r--r--phpBB/includes/db/mssql.php8
-rw-r--r--phpBB/includes/db/mssql_odbc.php8
-rw-r--r--phpBB/includes/db/mssqlnative.php8
-rw-r--r--phpBB/includes/db/postgres.php8
-rw-r--r--phpBB/includes/db/sqlite.php8
7 files changed, 60 insertions, 0 deletions
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index bf0dc15fad..c040fa8e2d 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -301,6 +301,18 @@ class dbal
}
/**
+ * Build a concatenated string
+ *
+ * @param string $string1 Base SQL statement where we append the second one
+ * @param string $string2 SQL statement that is appended on the first statement
+ * @return string Concatenated string
+ */
+ function sql_concatenate($string1, $string2)
+ {
+ return 'CONCAT(' . $string1 . ', ' . $string2 . ')';
+ }
+
+ /**
* Returns whether results of a query need to be buffered to run a transaction while iterating over them.
*
* @return bool Whether buffering is required.
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
index 7709e8fdf5..884206d298 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/firebird.php
@@ -111,6 +111,14 @@ class dbal_firebird extends dbal
}
/**
+ * {@inheritDoc}
+ */
+ function sql_concatenate($string1, $string2)
+ {
+ return $string1 . ' || ' . $string2;
+ }
+
+ /**
* SQL Transaction
* @access private
*/
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php
index abeabc389f..16b3b3c600 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/includes/db/mssql.php
@@ -92,6 +92,14 @@ class dbal_mssql extends dbal
}
/**
+ * {@inheritDoc}
+ */
+ function sql_concatenate($string1, $string2)
+ {
+ return $string1 . ' + ' . $string2;
+ }
+
+ /**
* SQL Transaction
* @access private
*/
diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php
index 6e24f4e9e8..c1ee1b43f0 100644
--- a/phpBB/includes/db/mssql_odbc.php
+++ b/phpBB/includes/db/mssql_odbc.php
@@ -110,6 +110,14 @@ class dbal_mssql_odbc extends dbal
}
/**
+ * {@inheritDoc}
+ */
+ function sql_concatenate($string1, $string2)
+ {
+ return $string1 . ' + ' . $string2;
+ }
+
+ /**
* SQL Transaction
* @access private
*/
diff --git a/phpBB/includes/db/mssqlnative.php b/phpBB/includes/db/mssqlnative.php
index 8a4503f111..db1bb86620 100644
--- a/phpBB/includes/db/mssqlnative.php
+++ b/phpBB/includes/db/mssqlnative.php
@@ -260,6 +260,14 @@ class dbal_mssqlnative extends dbal
/**
* {@inheritDoc}
*/
+ function sql_concatenate($string1, $string2)
+ {
+ return $string1 . ' + ' . $string2;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
function sql_buffer_nested_transactions()
{
return true;
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index bf22cffafa..dddf615f9c 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -155,6 +155,14 @@ class dbal_postgres extends dbal
}
/**
+ * {@inheritDoc}
+ */
+ function sql_concatenate($string1, $string2)
+ {
+ return $string1 . ' || ' . $string2;
+ }
+
+ /**
* SQL Transaction
* @access private
*/
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php
index 86bfa75a13..38aba0624e 100644
--- a/phpBB/includes/db/sqlite.php
+++ b/phpBB/includes/db/sqlite.php
@@ -73,6 +73,14 @@ class dbal_sqlite extends dbal
}
/**
+ * {@inheritDoc}
+ */
+ function sql_concatenate($string1, $string2)
+ {
+ return $string1 . ' || ' . $string2;
+ }
+
+ /**
* SQL Transaction
* @access private
*/