• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.