my controller is
function shiftstudentdetailsmultiple(){ $data['Show'] = $this->input->post('show[]'); $roll = $this->input->post('roll[]'); //echo sizeof($data1); for($i=0;$i<sizeof($roll);$i++) { $data['results'] = $this->FetchData->getstudentsdetailscouseandmultiple($roll[$i]); } $this->load->view('registrar/shift_student_view', $data); } and model is
function getstudentsdetailscouseandmultiple($Uniq_Id){ $this->db->select("sprd.Uniq_Id, sprd.Name, sprd.Uni_Roll_No, cd.Course_Name, bd.Branch_Name, sprd.Year, sprd.Session, sprd.Section, sprd.Fee_Status, sprd.Curr_Status"); $this->db->where("sprd.Uniq_Id",$Uniq_Id); $this->db->from("Students_Prim_Detals sprd"); $this->db->join('Course_Details cd', 'cd.Course_Id=sprd.Course_id'); $this->db->join('Branch_Details bd', 'bd.Branch_Id=sprd.Branch_id'); $query = $this->db->get(); if ($query->num_rows() > 0){ return $query->result(); } else { return false; } } when showing in view the fetching data showing only one time.. but in my database i have more then 4 entry when i print_r
$data['results']=this->FetchData->getstudentsdetailscouseandmultiple($roll[$i]); the data showing correct .. when load only showing one data..the last entry..
$this->load->view('registrar/shift_student_view', $data);