BUGFIX Fixed broken query if deleting a single File record - order by is not necessary and breaks MSSQL

This commit is contained in:
Sean Harvey 2009-09-08 04:05:40 +00:00
parent 37f29d46a3
commit df81f2a037

View File

@ -57,7 +57,7 @@ class FileSubsites extends DataObjectDecorator {
break;
}
if(sizeof($query->select)>1 || $query->select[0]!='COUNT(*)'){
if(sizeof($query->select) > 1 && $query->select[0] != 'COUNT(*)'){
$query->orderby = 'SubsiteID' . ($query->orderby ? ', ' : '') . $query->orderby;
}
}