how to retrieve application component id?

I am trying to use CDbHttpSession but I am using MySQL instead of the default SQLite. So I am required to input the CDbHttpSession::connectionID. Where can I find the Yii::app()->db 's component ID? :unsure:

I tried looking through CApplicationComponent, CComponent, CWebApplication, IApplicationComponent but has yet to get something like getId().

thanks in advance for any help.

The id for the connection component is usually simply db.

It’s usually ‘db’, but will be in the same main.php. Here’s my entry:

'session' => array(




'db' => array(

    'class' => 'CDbConnection',

    'connectionString' => 'mysql:host=localhost;dbname=blah',



eh this is f***ing cool! B) it’s so easy to use and managed. thanks auxbuss and mike for helping.

hopefully this thread benefit others.

cheers. :)