diff --git a/module/pivot/model.php b/module/pivot/model.php index 2c12868e49..453279ec7d 100644 --- a/module/pivot/model.php +++ b/module/pivot/model.php @@ -1539,7 +1539,14 @@ class pivotModel extends model } else { - $columnSQL = "$stat(tt.`$field`) as `$uuName`"; + if($fields[$field]['type'] == 'number') + { + $columnSQL = "$stat(tt.`$field`) as `$uuName`"; + } + else + { + $columnSQL = "$stat(0) as `$uuName`"; + } } if($slice != 'noSlice') $columnSQL = "select $groupList,`$slice`,$columnSQL from ($sql) tt" . $connectSQL . $groupSQL . ",tt.`$slice`" . $orderSQL . ",tt.`$slice`";