Alternate for mysql_insert_id

Hi All,

I just wanted to know is there any alternate option available in Yii that can work the same as mysql_insert_id i.e which can tell the latest inserted id in any particular table


If you use CActiveRecords models… after the $model->save() you just read the value of the primary key filed… like



and there is lastInsertID -