Welcome Guest, Not a member yet? Register   Sign In
Return Row ID when inserting
#1

[eluser]domfosnz[/eluser]
Is there any way of accessing the Row Id of a freshly inserted record.

Once I have inserted a record I need to insert several child records in a separate table with the parent records ID.

Thanks
#2

[eluser]Jelmer[/eluser]
$this->db->insert_id()

Take a look at http://ellislab.com/codeigniter/user-gui...lpers.html for more helpfull functions.
#3

[eluser]domfosnz[/eluser]
Thanks Smile




Theme © iAndrew 2016 - Forum software by © MyBB