Skip to content
Advertisement

how to get updated id in codeigniter

i’m new to Codeigniter, but learning from web, actually i got stuck with a unknown proble.

im inserting data into the database throw the model, and fetching back the data into form.

but when i’m updating the form i want to return the updated id.

i used $user_id = $this->db->insert_id(); but this is for getting insert id,

even i tried this

JavaScript

help me out, Thanks for everything..

Advertisement

Answer

Just do like this:

JavaScript

If it is updated, then return back that $student_id. 🙂

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement