The latest trunk version of CakePHP uses the php method mysql_last_insertid() exclusively to find the last inserted id of the last record. However, this function may not work properly on some servers. I have submitted an enhancement ticket #717 to the trac.
In the meantime, here is the work around I use. if(!$album_id) { $temp = $this->Album->execute("SELECT LAST_INSERT_ID() from pe_albums"); $album_id = $temp[0][0]['last_insert_id()']; } where the $album_id would be the variable supposed to have the id from $this->Album->getLastInsertID() or $this->Album->id(); both of which return nothing on this particular server. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---