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
pull/17/head
Aleksander Machniak 12 years ago
parent 9ad08104fc
commit fec9f1174a

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix SQL query for contacts listing on MS SQL Server (#1488505)
- Update to TinyMCE 3.5.2
- Fix window.resize handler on IE8 and Opera (#1488453)
- Don't let error message popups cover the login form (#1488500)

@ -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 = ' || ';

Loading…
Cancel
Save