mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX #5320 ManyManyComplexTableField::getQuery() now uses T-SQL compatible syntax CASE WHEN instead of IF THEN which works in multiple databases as well (from r102436)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112066 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
29edff8c38
commit
19f4c1ef89
@ -44,7 +44,7 @@ class ManyManyComplexTableField extends HasManyComplexTableField {
|
||||
|
||||
function getQuery() {
|
||||
$query = parent::getQuery();
|
||||
$query->select[] = "IF(\"{$this->manyManyParentClass}ID\" IS NULL, '0', '1') AS Checked";
|
||||
$query->select[] = "CASE WHEN \"{$this->manyManyParentClass}ID\" IS NULL THEN '0' ELSE '1' END AS Checked";
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user