Changeset 478 for pro-violet-viettel/sourcecode/application/modules/admin/models/collabolator_model.php
- Timestamp:
- Nov 12, 2014 9:28:43 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/models/collabolator_model.php
r464 r478 123 123 if ($data['keyword']) { 124 124 if ($data['search_field'] == "cellphone") { 125 $where.=" WHERE (tblcollaborator.cellphone LIKE '%" . $data['keyword'] . "%')"; 126 } else { 127 $where.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%') "; 125 $where.=" WHERE (tbluser.cellphone LIKE '%" . $data['keyword'] . "%')"; 128 126 } 129 127 } … … 153 151 if ($data['keyword']) { 154 152 if ($data['search_field'] == "cellphone") { 155 $where.=" WHERE (tblcollaborator.cellphone LIKE '%" . $data['keyword'] . "%')"; 156 } else { 157 $where.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%') "; 158 } 153 $where.=" WHERE (tbluser.cellphone LIKE '%" . $data['keyword'] . "%')"; 154 } 159 155 } 160 156 // $from = date("Y-m-d 00:00:00",$from); 161 157 $sql="SELECT *,tblcollaborator.created_time as collaborator_created_time,tbluser.cellphone as user_cellphone,tblcollaborator.cellphone as collaborator_cellphone, tbluser.created_time as user_created_time FROM ".$this->table_name." INNER JOIN tbluser ON tbluser.collaborator = tblcollaborator.id ".$where." AND tbluser.collaborator = ".$data['id']." ".$order." LIMIT " . $data['start'] . ", " . $data['perpage'] . " "; 162 163 158 $result = $this->db->query($sql)->result_array(); 164 159 foreach ($result as $index=>$paidlog)
Note: See TracChangeset
for help on using the changeset viewer.