diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2012-06-20 02:10:04 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2012-06-20 02:10:04 +0200 |
| commit | 1e3272bfced5e5a2295e6410ef1fec0800b58d99 (patch) | |
| tree | a2385e3f758cab18adb51337fe507c697f9a20f7 /phpBB/includes/db/dbal.php | |
| parent | dd0da6fffb3358937ebfdb3ff347089d97e64a1a (diff) | |
| download | forums-1e3272bfced5e5a2295e6410ef1fec0800b58d99.tar forums-1e3272bfced5e5a2295e6410ef1fec0800b58d99.tar.gz forums-1e3272bfced5e5a2295e6410ef1fec0800b58d99.tar.bz2 forums-1e3272bfced5e5a2295e6410ef1fec0800b58d99.tar.xz forums-1e3272bfced5e5a2295e6410ef1fec0800b58d99.zip | |
[ticket/10942] Add sql_concatenate to dbal
PHPBB3-10942
Diffstat (limited to 'phpBB/includes/db/dbal.php')
| -rw-r--r-- | phpBB/includes/db/dbal.php | 12 |
1 files changed, 12 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. |
