mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUGFIX: orderby clause not necessary for simple count queries, and will break MSSQL
This commit is contained in:
parent
5406ab5b60
commit
9e9cf9a4c2
@ -57,7 +57,9 @@ class FileSubsites extends DataObjectDecorator {
|
||||
break;
|
||||
}
|
||||
|
||||
$query->orderby = 'SubsiteID' . ($query->orderby ? ', ' : '') . $query->orderby;
|
||||
if(sizeof($query->select)>1 || $query->select[0]!='COUNT(*)'){
|
||||
$query->orderby = 'SubsiteID' . ($query->orderby ? ', ' : '') . $query->orderby;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user