%PDF- %PDF-
Direktori : /home/ugotscom/www/boniface/application/modules/Search/models/ |
Current File : /home/ugotscom/www/boniface/application/modules/Search/models/Search_model.php |
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Search_model extends CI_Model { function __construct() { // Call the Model constructor parent::__construct(); } /////////////Check User////////////////////// public function location_list(){ $this->db->select('location_id,location'); $this->db->from('locations'); $this->db->where('status','1'); $query = $this->db->get(); $row = $query->result_array(); return $row; } public function specialities(){ $this->db->select('id,speciality'); $this->db->from('specialities'); $this->db->where('status','1'); $query = $this->db->get(); $row = $query->result_array(); return $row; } public function hospitals(){ $this->db->select('hospital_id,hospital_name'); $this->db->from('hospitals'); $this->db->where('status','1'); $query = $this->db->get(); $row = $query->result_array(); return $row; } function getUsers($postData){ $response = array(); $this->db->select('*'); if($postData['search'] ){ // Select record $this->db->where("country like '%".$postData['search']."%' "); $records = $this->db->get('international')->result(); foreach($records as $row ){ $response[] = array("value"=>$row->id,"label"=>$row->country); } } return $response; } function holidays($postData){ $response = array(); $this->db->select('*'); if($postData['search'] ){ // Select record $this->db->where("cities like '%".$postData['search']."%' "); $records = $this->db->get('international')->result(); foreach($records as $row ){ $response[] = array("value"=>$row->id,"label"=>$row->cities); } } return $response; } } ?>