YII框架如何直接通过sql更新?
$sql="update".$val."setTicketStatus=:TicketStatusandPauseOperator=:PauseOperatorwhere...
$sql = " update ".$val. " set TicketStatus =:TicketStatus and PauseOperator =:PauseOperator where TicketNo =:TicketNo";
$db=Yii::app()->db;
$db->createCommand($sql)->execute(array(':TicketStatus'=>'5',':PauseOperator'=>$data["PauseOperator"],':TicketNo'=>$TicketNo));
就类似于这种 更新
$db->createCommand($sql)->execute(array(':TicketStatus'=>'5',':PauseOperator'=>$data["PauseOperator"],':TicketNo'=>$TicketNo));这个不对 没有执行成功,请教!!!!!!!! 展开
$db=Yii::app()->db;
$db->createCommand($sql)->execute(array(':TicketStatus'=>'5',':PauseOperator'=>$data["PauseOperator"],':TicketNo'=>$TicketNo));
就类似于这种 更新
$db->createCommand($sql)->execute(array(':TicketStatus'=>'5',':PauseOperator'=>$data["PauseOperator"],':TicketNo'=>$TicketNo));这个不对 没有执行成功,请教!!!!!!!! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询