From 53c044fc4d83549ca239872f6a4b0fe3dd49cec1 Mon Sep 17 00:00:00 2001 From: lsmith Date: Thu, 10 Jan 2008 08:49:13 +0000 Subject: [PATCH] - ported concat() from MDB2 --- lib/Doctrine/Expression/Mysql.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/Expression/Mysql.php b/lib/Doctrine/Expression/Mysql.php index 08c8e9398..0f26b2057 100644 --- a/lib/Doctrine/Expression/Mysql.php +++ b/lib/Doctrine/Expression/Mysql.php @@ -110,4 +110,18 @@ class Doctrine_Expression_Mysql extends Doctrine_Expression_Driver { return 'UUID()'; } -} \ No newline at end of file + + /** + * Returns string to concatenate two or more string parameters + * + * @param string $value1 + * @param string $value2 + * @param string $values... + * @return string to concatenate two strings + **/ + function concat($value1, $value2) + { + $args = func_get_args(); + return 'CONCAT('.implode(', ', $args).')'; + } +}