Welcome Guest, Not a member yet? Register   Sign In
Selecting using where_not_in column array
#1

favorite

Code:
Good day sir,     please help me out. I want to get list using below code. But don't know how to get where $exception is not in 'subject_exception'  column.    

Please, let me know where I am missing it. I shall be very grateful for your support. Thanks
Image for the mysql table
https://schoollink.com.ng/question.png

Code:
$data['class_id']   = $this->input->post('class_id');
$data['section_id'] = $this->input->post('section_id');
$subject_exception  = $this->input->post('subject_id');
$data['year']       ='2016-2017';
$check=??? selecting column 'subject_exception' in array eg array(1,2,3)
$this->db->where_not_in($subject_exception , $check);
$this->db->where('class_id' , $data['class_id']);
$this->db->where('year' , $data['year']);              
$this->db->where('section_id' , $data['section_id']);  
$this->db->from('enroll');
$students=$this->db->get()->result_array();

I need the result ($students) for other operation


Attached Files Thumbnail(s)
   
Reply




Theme © iAndrew 2016 - Forum software by © MyBB