Hi,
insert() returns exactly you need.
http://framework.zend.com/apidoc/core/Zend_Db/Table/Zend_Db_Table_Abstract.html#insert
return: The last insert ID.
Sincerely,
On 5/4/07, José de Menezes Soares Neto <[EMAIL PROTECTED]> wrote:
Hi friends,
I am inserting a new record in a DB, but, I would like to retrieve the ID of
the new record...
How can I do that?
$data = array(
'fun_nome' => $fun_nome,
'fun_cpf' => $fun_cpf,
'fun_cep' => $fun_cep,
'fun_observacoes' => $fun_observacoes,
'fun_data' => date("Y-m-d h:i:s"),
);
$funcionarios = new Funcionarios();
$funcionarios->insert($data);
<------------------------------- here!
best regards,
José de Menezes
--
Alex
http://www.alexatnet.com/ - Blog and CMS created with Zend Framework and Ajax.