Ignore:
Timestamp:
Nov 3, 2014 6:48:32 PM (11 years ago)
Author:
namnd
Message:
 
File:
1 edited

Legend:

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

    r375 r396  
    2222        {
    2323                $sql="SELECT * FROM ".$this->table_name;
    24                 $data['keyword']='';
    2524                if ($data['keyword'])
    2625                {
    2726                        $sql.=" WHERE (cellphone LIKE '%".$data['keyword']."%' OR collaborator LIKE '%".$data['keyword']."%' OR acc_balanced LIKE '%".$data['keyword']."%') ";
     27                }
     28                $order = "";
     29                if ($data['sorting_order'] != "sorting") {
     30                        $sort = "DESC";
     31                        if ($data['sorting_order'] == "sorting_asc")
     32                                $sort = "ASC";
     33                        $order = "ORDER BY " . $data['sorting_field'] . " " . $sort;
    2834                }
    2935                return $this->db->query($sql." ORDER BY us_id DESC LIMIT ".$data['start'].", ".$data['perpage']." ")->result_array();
Note: See TracChangeset for help on using the changeset viewer.