I have a table Students which has student_id (Pk) and two columns class_id and class_id2 as a student can be registered in two classes i would like to use Code-igniter to get the values of both columns and i tried arrays but it doesn't seem to work as it gets all students
<?php
$students = $this->db->get_where('student' , array('class_id'=>$class_id) )->result_array();
foreach($students as $row):?>
<tr class="gradeA">
<td><?php echo $row['roll'];?></td>
<td><?php echo $row['name'];?></td>
<?php
when i change the value to class_id2 it gets the values from that column but i don't know if there is a way i can get both?