summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-06-04 10:11:24 +0200
committerAleksander Machniak <alec@alec.pl>2012-06-04 10:11:24 +0200
commit46b6c5475bf2b188e04c1e0a5fe8a9e387ecda80 (patch)
treed92c3b30e024acaf350c04866fccf19461772de0 /program
parent1d5606617e11aaa855af7edc6c440f6b4aa5863a (diff)
Modify CONCAT() arguments, because + operator requires them to be of type varchar (#1488505)
With SQL Server 2012 we can use just CONCAT(), but we need to support older versions
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_mdb2.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php
index a255d9e6e..721963b4c 100644
--- a/program/include/rcube_mdb2.php
+++ b/program/include/rcube_mdb2.php
@@ -691,6 +691,11 @@ class rcube_mdb2
case 'mssql':
case 'sqlsrv':
$delim = ' + ';
+ // Modify arguments, because + operator requires them to be of type varchar (#1488505)
+ // with SQL Server 2012 we can use just CONCAT(), but we need to support older versions
+ foreach ($args as $idx => $arg) {
+ $args[$idx] = "CAST($arg AS varchar)";
+ }
break;
default:
$delim = ' || ';