Commit 7d25bcdb by Jansa Jose

j : flight apis error

parent 8dd815b2
...@@ -108,7 +108,7 @@ class FlightServices extends CI_Controller { ...@@ -108,7 +108,7 @@ class FlightServices extends CI_Controller {
public function flight_book(){ public function flight_book(){
$data = (array)json_decode(file_get_contents('php://input')); $data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$res = $thia->FlightServices_model->flight_book($data); $res = $this->FlightServices_model->flight_book($data);
if($res['status'] == 1){ if($res['status'] == 1){
$this->response($res['data']); $this->response($res['data']);
}else{ }else{
......
...@@ -197,7 +197,7 @@ class FlightServices_model extends CI_Model { ...@@ -197,7 +197,7 @@ class FlightServices_model extends CI_Model {
try{ try{
$cond = ''; $cond = '';
if(isset($data['query']) && !empty($data['query'])){ if(isset($data['query']) && !empty($data['query'])){
$cond = "WHERE airport_code LIKE '%".$data['query']."%' OR airport_name LIKE '%".$data['query']."%'"; $cond = "WHERE airport_code LIKE '%".$data['query']."%' OR airport_name LIKE '%".$data['query']."%' OR city LIKE '%".$data['query']."%'";
} }
$sql = "SELECT id FROM airport_details $cond"; $sql = "SELECT id FROM airport_details $cond";
$count = $this->db->query($sql)->num_rows(); $count = $this->db->query($sql)->num_rows();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment