1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 02:36:38 +02:00

[ticket/10942] Add sql_concatenate to dbal

PHPBB3-10942
This commit is contained in:
Joas Schilling
2012-06-20 02:10:04 +02:00
parent dd0da6fffb
commit 1e3272bfce
7 changed files with 60 additions and 0 deletions

View File

@@ -300,6 +300,18 @@ class dbal
return $sql_condition;
}
/**
* 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.
*