- Timestamp:
- Nov 10, 2014 10:10:32 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/models/paidlog_model.php
r422 r441 11 11 parent::__construct(); 12 12 } 13 function get Smstemplates($data) {13 function getPaidlogs($data) { 14 14 $sql = "SELECT * FROM " . $this->table_name. " INNER JOIN tbluser ON tbluser.us_id = tblpaidlog.us_id "; 15 15 if ($data['keyword']) { … … 50 50 } 51 51 52 function count Smstemplate($data) {52 function countPaidlog($data) { 53 53 $sql = "SELECT COUNT(".$this->id_name.") as total FROM " . $this->table_name; 54 54 if ($data['keyword']) { … … 62 62 return $result['total']; 63 63 } 64 function get Smstemplate($id)64 function getPaidlog($id) 65 65 { 66 66 $sql="SELECT * FROM ".$this->table_name." WHERE ".$this->id_name."=".$id." LIMIT 1"; … … 68 68 return $result; 69 69 } 70 function getAllPaidlogs($from) 71 { 72 // get all paidlogs from the last years until now 73 $from = date("Y-m-d 00:00:00",$from); 74 $sql="SELECT * FROM ".$this->table_name." WHERE paid_time > '".$from."'"; 75 $result = $this->db->query($sql)->result_array(); 76 foreach ($result as $index=>$paidlog) 77 { 78 $result[$index]['time']= strtotime($paidlog['paid_time']); 79 } 80 return $result; 81 } 70 82 }
Note: See TracChangeset
for help on using the changeset viewer.