This is the code work fine but only for one column search which is user
in below code, but need to search more than one column like password
, email
controller
public function index()
{
$this->input->post('search'); //this is drag from view table *name=search*
$search=$this->input->post('search');
$data['user']=$this->usermodel->searchUser($search);
$this->load->view('user',$data);
}
model
public function searchUser($search=null)
{
$this->db->select("*");
$this->db->from("tbl_user");
$this->db->where("user",$search); //user is one column of table *tbl_user*
$query=$this->db->get();
if($query->num_rows()>0)
{
$result=$query->result_array();
return $result;
} else {
return false;
}
}