[CakePHP] 直前にsave()したレコードのidを取得する
CakePHPで直前にsave()したレコードのidを取得する方法です。
$this->Hoge->save($save_data); $id = $this->Hoge->getLastInsertID();