- Timestamp:
- Nov 19, 2014 2:08:05 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r561 r574 482 482 } 483 483 484 public function getPaidlog($ us_id)484 public function getPaidlog($data) 485 485 { 486 $this->db->query ( 'UNLOCK TABLES' ); 487 $sql = 'SELECT * FROM tblpaidlog where us_id = ?'; 486 $us_id = $data['us_id']; 487 $this->db->query ( 'UNLOCK TABLES' ); 488 $sql = "SELECT * FROM tblpaidlog where us_id = ? ORDER BY paid_time DESC LIMIT ".$data['start'].", ".$data['perpage']." "; 488 489 $query = $this->db->query ( $sql, array ( 489 490 $us_id … … 492 493 return $row; 493 494 } 495 496 public function countPaiglogs($us_id) 497 { 498 $this->db->query ( 'UNLOCK TABLES' ); 499 $sql="SELECT COUNT(paid_id) AS total FROM tblpaidlog WHERE us_id = ?"; 500 $query = $this->db->query ( $sql, array ( 501 $us_id 502 ) ); 503 $result = $query->row_array(); 504 return $result['total']; 505 } 494 506 }
Note: See TracChangeset
for help on using the changeset viewer.