From 07963e065b24dbdc1883c585a18e6d6d8cef8718 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Tue, 11 Jul 2023 09:37:42 +0800 Subject: [PATCH] * Try to fix bug #36385. --- module/pivot/model.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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`";