Here is a code where i'm inserting some values to table row. in the next line i want the id of that row. may i know how can i get that. Below is the code.
$data = array(
'i_course_id' => $post_data['course_id'],
'i_cousem_id' => $crs_semister,
'i_event' => $post_data['event'],
'i_event_year' => $year,
'i_stu_crs_random_id' => $studentData['random_id'],
'i_no_scan' => 1
);
$this->db->insert('i_stud_crs', $data);