How can i use dbConnection in the component

How can i use dbConnection in the component,i want run sql in the component.

To get CDbConnection instance: $db = Yii::app()->db;

To get CDbCommandBuilder instance: $builder = Yii::app()->db->commandBuilder;

cool!

it’s work,thank you very much!