I'm having a problem returning multiple rows dynamically.
I have an active record query that needs to return multiple rows from the same table.
//this will be a dynamic array of ids
$array = array('01','02','03');
//i need to have other where conditionals as well
$cond['userlevel'] = 5;
//then add the array of ids to the conditionals array
$cond['id'] = implode(',',$array);
//then build the active record query
$q = $this->db->select($col->where($cond);
It only ever seems to return the first item in the array of ids.
$q=$this->db->select('*')->from('table_name')->where($cond)->where_in('id',$array)->get();, maybe this will work (remember to changetable_nameto yours); - bobo$cond['id'] = implode(',',$array);needs to be removed first. - bobo