Number Of Affected Rows

In Yii, is there a method which returns the number of affected rows from most recent query?

Something like




$this->db->affected_rows()



in CodeIgniter ( http://ellislab.com/...se/helpers.html ).

I looked at CDbConnection methods but I couldn’t find anything.

Thanks.

Some methods like updateAll, deleteAll return this number as a result.

Internally they just return $command->execute();

read: http://www.yiiframework.com/doc/guide/1.1/en/database.dao

so:




$affected_rows = Yii::app()->db->createCommand( 'UPDATE ...' )->execute();



That’s too easy :D But I don’t want to execute a command/query, I need the number of affected rows from the most recent query (executed in the past without explicitly saving the number of rows).