[Svn-src-all:1351] [version-2_5-dev 20241] refs #1013

shutta admin @ mail.ec-cube.net
2011年 2月 20日 (日) 06:51:07 JST


Subversion committed to /home/svn/open 20241
http://svn.ec-cube.net/open_trac/changeset/20241
┌────────────────────────────┐
│更新者 :  shutta                                       │
│更新日時:  2011-02-20 06:51:07 +0900 (日, 20  2月 2011)│
└────────────────────────────┘

Log:
--------------------------------------------------------
refs #1013
会員別集計のPostgreSQLでのエラーを修正。


Changed:                      [U:修正,A:追加,D:削除]
--------------------------------------------------------
U   branches/version-2_5-dev/data/class/pages/admin/total/LC_Page_Admin_Total.php

変更: branches/version-2_5-dev/data/class/pages/admin/total/LC_Page_Admin_Total.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/admin/total/LC_Page_Admin_Total.php	2011-02-19 21:45:20 UTC (rev 20240)
+++ branches/version-2_5-dev/data/class/pages/admin/total/LC_Page_Admin_Total.php	2011-02-19 21:51:07 UTC (rev 20241)
@@ -489,25 +489,21 @@
             SUM(total) AS total,
             AVG(total) AS total_average,
             CASE
-                WHEN customer_id <> 0 AND order_sex = 1 THEN 1
-                WHEN customer_id <> 0 AND order_sex = 2 THEN 2
-                WHEN customer_id = 0 AND order_sex = 1 THEN 3
-                WHEN customer_id = 0 AND order_sex = 2 THEN 4
+                WHEN customer_id <> 0 THEN 1
                 ELSE 0
             END AS member,
-            order_sex,
-            customer_id
+            order_sex
                 ";
         $from       = "dtb_order";
 
-        $objQuery->setGroupBy("member");
+        $objQuery->setGroupBy("member, order_sex");
 
         $arrTotalResults = $objQuery->select($col, $from, $where, $arrval);
 
         foreach($arrTotalResults as &$arrResult) {
             $member_key = $arrResult['order_sex'];
             if($member_key != "") {
-                $arrResult['member_name'] = (($arrResult['customer_id']) ? '会員' : '非会員') . $this->arrSex[$member_key];
+                $arrResult['member_name'] = (($arrResult['member']) ? '会員' : '非会員') . $this->arrSex[$member_key];
             } else {
                 $arrResult['member_name'] = "未回答";
             }




Svn-src-all メーリングリストの案内