How can i use dbConnection in the component,i want run sql in the component.
Page 1 of 1
How can i use dbConnection in the component
#2
Posted 17 January 2010 - 02:20 AM
To get CDbConnection instance: $db = Yii::app()->db;
To get CDbCommandBuilder instance: $builder = Yii::app()->db->commandBuilder;
To get CDbCommandBuilder instance: $builder = Yii::app()->db->commandBuilder;
Share this topic:
Page 1 of 1

Help













