phpzend-frameworkinsertzend-db

last insert id with zend db table abstract


variable $tablemodel in an instance of a model which extends Zend_Db_Table_Abstract, if i do

$tablemodel->insert($data)

to insert data. Is there any method or property to get last insert id?

regards


Solution

  • try

    $id = $tablemodel->insert($data);  
    echo $id;