View file File name : Business_Core_model.php Content :<?php class Business_Core_model extends CI_model{ public function get_team(){ $query=$this->db->query("SELECT core_team.*,users.first_name,users.last_name FROM core_team JOIN users ON core_team.updated_by = users.id"); return $query->result(); } public function add_team($name,$email,$designation,$file,$updated_by){ $query=$this->db->query("INSERT INTO `core_team`(`name`,`email`,`designation`, `image`, `updated_by`) VALUES ('$name','$email','$designation','$file','$updated_by')"); return $this->db->insert_id(); } public function add_enq($service,$name,$contact,$email,$desc,$profile_type,$income,$loan_requirement){ $query=$this->db->query("INSERT INTO `loan_enquiry`(`service`,`name`,`email`,`contact`, `description`,`profile_type`,`income`,`loan_requirement`) VALUES ('$service','$name','$email','$contact','$desc','$profile_type','$income','$loan_requirement')"); return $this->db->insert_id(); } public function get_locations(){ $query = $this->db->query("select * from locations"); return $query->result(); } public function get_types(){ $query = $this->db->query("SELECT * FROM `types_of_property`"); return $query->result(); } public function get_banks_id($id){ $query=$this->db->query("SELECT * FROM `bank` where id in ($id)"); return $query->result(); } public function get_amminities(){ $query=$this->db->query("SELECT * FROM `aminities`"); return $query->result(); } public function get_near_by(){ $query=$this->db->query("SELECT * FROM `nearby`"); return $query->result(); } } ?>