Changeset 17568 for branches/comu-ver2/data/class/pages/admin/total
- Timestamp:
- 2008/08/28 09:33:38 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/pages/admin/total/LC_Page_Admin_Total.php
- Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
r17546 r17568 638 638 639 639 // 会員集計の取得 640 $col = "COUNT(*) AS order_count, SUM(total) AS total, (AVG(total)) AS total_average, order_sex";640 $col = "COUNT(*) AS order_count, SUM(total) AS total, trunc(AVG(total)) AS total_average, order_sex"; 641 641 $from = "dtb_order"; 642 642 $objQuery = new SC_Query(); … … 704 704 /** 職業別集計 **/ 705 705 function lfGetOrderJob($type, $sdate, $edate, &$objPage, $graph = true) { 706 global $arrJob;707 708 706 list($where, $arrval) = $this->lfGetWhereMember('T2.create_date', $sdate, $edate, $type); 709 707 710 $sql = "SELECT job, count(*) AS order_count, SUM(total) AS total, (AVG(total)) AS total_average ";708 $sql = "SELECT job, count(*) AS order_count, SUM(total) AS total, trunc(AVG(total)) AS total_average "; 711 709 $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; 712 710 $sql.= " GROUP BY job ORDER BY total DESC";
Note: See TracChangeset
for help on using the changeset viewer.
