Changeset 763
- Timestamp:
- Feb 12, 2015 4:01:01 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/models/reportmodel.php
r762 r763 22 22 $provinces = lang('_PROVINCES_'); 23 23 // Tinh doanh thu theo tinh theo nam 24 $sql = "SELECT *,SUM(amount) as total FROM tblpaidlog LEFT JOIN tbluser ON tbluser.us_id=tblpaidlog.us_id WHERE tblpaidlog.paid_time > '" . $input['year'] . "-01-01' AND tblpaidlog.paid_time <'" . ($input['year'] + 1) . "-01-01' GROUP BY tbluser.province";24 $sql = "SELECT *,SUM(amount) as total FROM tblpaidlog LEFT JOIN tbluser ON tbluser.us_id=tblpaidlog.us_id WHERE tblpaidlog.paid_time >= '" . $input['year'] . "-01-01' AND tblpaidlog.paid_time <= '" . ($input['year'] + 1) . "-01-01' GROUP BY tbluser.province"; 25 25 $query = $this->db->query($sql); 26 26 $dtns = $query->result_array();
Note: See TracChangeset
for help on using the changeset viewer.