[eluser]Joseph Wensley[/eluser]
I don't think you could do this all in one query but something like this might work.
Code:
$this->db->query("UPDATE student_applicants SET `status` = 'enrolled' WHERE `applicant_id` = '$applicant_id'");
$this->db->query("INSERT INTO master_people SET `status` = 'status', `role` = 'role'");
$user_id = $this->db->insert_id()
$this->db->query("INSERT INTO dept_people (`dp_userid`,`fname`,`lname`) SELECT '$user_id',`fname`,`lname` FROM student_applicants WHERE `applicant_id` = '$applicant_id'");
If the user_id in master_people isn't an autoincrement then obviously you would set it to something and use that instead of the insert_id for the 2nd insert.