diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-06-04 10:11:24 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-06-04 10:13:42 +0200 |
commit | fec9f1174ad74d043f2f47998ad44a0e61d13c59 (patch) | |
tree | 15c60312a41a37d52ca7950b9868d0cdbcabc46d /program | |
parent | 9ad08104fcac8613d8a92bd85d90dc81e302291a (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.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php index c103f9a61..3d8891d2f 100644 --- a/program/include/rcube_mdb2.php +++ b/program/include/rcube_mdb2.php @@ -648,6 +648,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 = ' || '; |