Tenta

$this->Question->getLastInsertId();

On 9/10/07, hostdesigner <[EMAIL PROTECTED]> wrote:
>
>
> Eu estou tentando resgatar o último ID gerado pelo INSERT, mas, sempre
> dá um erro.
>
> if ($this->Question->save($this->data)) {
>         $questions_id = $this->Question->lastInsertId();
> }
>
>
> ERRO:
> 1064: You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use
> near 'lastInsertId' at line 1
>
> Alguém faz idéia do por que isso acontece?
>
> Falopa!
>
>
> >
>


-- 
________________________________________________________
Thiago Paes - WebDeveloper - Linux user: #224062
site: http://www.thiagopaes.com.br

--~--~---------~--~----~------------~-------~--~----~
Recebeu esta mensagem porque está inscrito em Grupo "Cake PHP Português" do 
Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
cake-php-pt@googlegroups.com
 Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-PT
-~----------~----~----~----~------~----~------~--~---

Responder a