How do I get the value of the increment field

Hello,friends:

My Program uses DAO insert data to article table,the id field is auto_increment field in this table,I need id’s value after insert executive,Please help me,Thank you!




$data=array(':subject'=>$subject,':content'=>$content);

$sql = 'INSERT INTO article(subject,content) VALUES(:subject,:content)';

$query = Yii::app()->db->CreateCommand($sql);

    $query->bindValues($data);

    $query->execute();



http://www.yiiframework.com/doc/api/1.1/CDbConnection#lastInsertID-detail

Thanks!