Changeset 17926


Ignore:
Timestamp:
2009/03/25 16:06:23 (13 years ago)
Author:
kishida
Message:

売上集計 MySQLのみで発生するバグ対応

File:
1 edited

Legend:

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

    r17776 r17926  
    639639 
    640640        // 会員集計の取得 
    641         $col = "COUNT(*) AS order_count, SUM(total) AS total, trunc(AVG(total)) AS total_average, order_sex"; 
     641        $col = "COUNT(*) AS order_count, SUM(total) AS total, trunc(AVG(total),0) AS total_average, order_sex"; 
    642642        $from = "dtb_order"; 
    643643        $objQuery = new SC_Query(); 
     
    707707        list($where, $arrval) = $this->lfGetWhereMember('T2.create_date', $sdate, $edate, $type); 
    708708 
    709         $sql = "SELECT job, count(*) AS order_count, SUM(total) AS total, trunc(AVG(total)) AS total_average "; 
     709        $sql = "SELECT job, count(*) AS order_count, SUM(total) AS total, trunc(AVG(total),0) AS total_average "; 
    710710        $sql.= "FROM dtb_customer AS T1 LEFT JOIN dtb_order AS T2 USING ( customer_id ) WHERE $where AND T2.del_flg = 0 and T2.status <> " . ORDER_CANCEL; 
    711711        $sql.= " GROUP BY job ORDER BY total DESC"; 
Note: See TracChangeset for help on using the changeset viewer.