Insert all funtion

Do Yii have insertAll funtion like updateAll? here is my controller and I need to insert data from one table to another table using check box.

this is from table A view file

<?php echo CHtml::beginForm(array(‘multirequest’))?>

<?php $this->widget(‘zii.widgets.grid.CGridView’, array(

'id'=&gt;'testgrid',


'dataProvider'=&gt;&#036;model-&gt;test(),


'filter'=&gt;&#036;model,


'columns'=&gt;array(


	array(


		'name'=&gt;'Select', 'value'=&gt;'CHtml::checkBox(&quot;cid[]&quot;,null,array(&quot;value&quot;=&gt;&#036;data-&gt;id,&quot;id&quot;=&gt;&quot;cid_&quot;.&#036;data-&gt;id))',


		'type'=&gt;'raw',


		'htmlOptions'=&gt;array('width'=&gt;5),


		//'visible'=&gt;false,


	),


	array(


    'name'=&gt;'C_id',


    'value'=&gt;'&#036;data-&gt;cat-&gt;name',


    ),


    array(


    'name'=&gt;'S_c_id',


    'value'=&gt;'&#036;data-&gt;s_cat-&gt;name',


    ),


    'name',


    'food',


    


),

)); ?>

<?php echo CHtml::submitButton(‘Submit’, array(‘submit’=>array(‘multirequest’))) ;?>

<?php echo CHtml::endForm(); ?>

data will go to table B:

controller

public function actionMultirequest()

{


if (&#036;_POST[&quot;cid&quot;] == 0)


{


	throw new CHttpException(400,'You did not select any data.');


		&#036;this-&gt;redirect(array('test'));


	} else {


		&#036;this-&gt;_model=B::model()-&gt;insertAll(array(&quot;user_Id&quot;=&gt; Yii::app()-&gt;user-&gt;id),&quot;id IN (&quot; .implode(&quot;,&quot;,&#036;_POST[&quot;cid&quot;]).&quot;)&quot;);


		&#036;this-&gt;redirect(array('admin'));


	}	


}

I have the same question, need to call Yii for "insert … select … from another_table"

it look like that we can use the CDbCommand to do the job.

$command= Yii::app()->getDb()->createCommand($sql);

$command->bind(…);

$command->execute();