Changeset 20241


Ignore:
Timestamp:
2011/02/20 06:51:07 (11 years ago)
Author:
shutta
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/admin/total/LC_Page_Admin_Total.php

    r20239 r20241  
    490490            AVG(total) AS total_average, 
    491491            CASE 
    492                 WHEN customer_id <> 0 AND order_sex = 1 THEN 1 
    493                 WHEN customer_id <> 0 AND order_sex = 2 THEN 2 
    494                 WHEN customer_id = 0 AND order_sex = 1 THEN 3 
    495                 WHEN customer_id = 0 AND order_sex = 2 THEN 4 
     492                WHEN customer_id <> 0 THEN 1 
    496493                ELSE 0 
    497494            END AS member, 
    498             order_sex, 
    499             customer_id 
     495            order_sex 
    500496                "; 
    501497        $from       = "dtb_order"; 
    502498 
    503         $objQuery->setGroupBy("member"); 
     499        $objQuery->setGroupBy("member, order_sex"); 
    504500 
    505501        $arrTotalResults = $objQuery->select($col, $from, $where, $arrval); 
     
    508504            $member_key = $arrResult['order_sex']; 
    509505            if($member_key != "") { 
    510                 $arrResult['member_name'] = (($arrResult['customer_id']) ? '会員' : '非会員') . $this->arrSex[$member_key]; 
     506                $arrResult['member_name'] = (($arrResult['member']) ? '会員' : '非会員') . $this->arrSex[$member_key]; 
    511507            } else { 
    512508                $arrResult['member_name'] = "未回答"; 
Note: See TracChangeset for help on using the changeset viewer.