Zend Framework: How to retrieve the id of the last inserted row?

Posted by Andrew on Stack Overflow See other posts from Stack Overflow or by Andrew
Published on 2009-12-08T18:04:26Z Indexed on 2010/04/21 12:43 UTC
Read the original article Hit count: 221

I'm inserting a new row into my database with this code:

$data = array(
    'key' => 'value'
);
$this->getDbTable()->insert($data);

How can I get the row id of the this row that I just created?

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework