Ignore:
Timestamp:
Nov 19, 2014 2:08:05 PM (10 years ago)
Author:
namnd
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php

    r561 r574  
    482482        }
    483483       
    484         public function getPaidlog($us_id)
     484        public function getPaidlog($data)
    485485        {
    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']." ";
    488489                $query = $this->db->query ( $sql, array (
    489490                                $us_id
     
    492493                return $row;
    493494        }
     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        }
    494506}
Note: See TracChangeset for help on using the changeset viewer.