Welcome Guest, Not a member yet? Register   Sign In
Id of last insert
#1

[eluser]sherwoodforest[/eluser]
I tried
$insert_id = $this->db->insert('change',$data);

but all I get back is 1 for the insert_id
what I want is the primary key for the row I just inserted
#2

[eluser]Dam1an[/eluser]
You need to use
Code:
$this->db->insert_id();
after making the query for the ID

(I'm assuming you probably get 1 back meaning success, and 0 would mean it failed?)
#3

[eluser]sherwoodforest[/eluser]
thank you




Theme © iAndrew 2016 - Forum software by © MyBB