⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

How to get mysql insert id after a record insertion



tabarry
  • profile picture
  • Member

Posted 31 January 2013 - 03:31 AM

How can I get mysql insert Id, once I insert the record.

victor
  • profile picture
  • Member

Posted 31 January 2013 - 07:01 AM

You can use the callback_after_insert function

tabarry
  • profile picture
  • Member

Posted 31 January 2013 - 10:37 AM

@Victor, can you show me the syntax to get it?

victor
  • profile picture
  • Member

Posted 31 January 2013 - 11:20 AM

there is an example on that page. the primary_key is your id.