Hi all,
In an action I need to call a stored procedure to duplicate rows in a DB table,
I have a query to get the values to pass to my stored procedure.
In my controller:-
public function actionAdmin(){
$date= "SELECT DATE(now())";
$mydate = Yii::app()->db->createCommand($date)->queryScalar();
$count="select classId,admissionId from studentattendances where Date=$mydate";
$resultset=array();
$resultset=Yii::app()->db->createCommand($count)->query();
foreach($resultset as $result){
$sql="CALL multiple_records('','$result->classId','$result->admissionId','','$mydate','1')";
Yii::app()->db->createCommand($sql)->execute();
}
But when my action is executed i am unable to get the duplicated rows. Can someone help me get it right?
thanks in advance.