PHP Yii框架更新多条数据时简单网页超时
程序员文章站
2024-02-11 19:18:16
...
PHP Yii框架更新多条数据时容易网页超时。
如我要更新很多表时,网页容易超时
PLMH1::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH2::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH3::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH4::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH5::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH6::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH7::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH8::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLSU::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLPE::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB1::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB2::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB3::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB4::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB5::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB6::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB7::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB8::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLCO::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
错识提示如下:
Fatal error: Maximum execution time of 30 seconds exceeded in D:\web_root\rd1039b\framework\db\CDbCommand.php on line 496
请问YII有其它比较快的更新方法吗?
谢谢!
如我要更新很多表时,网页容易超时
PLMH1::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH2::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH3::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH4::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH5::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH6::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH7::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLMH8::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLSU::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLPE::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB1::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB2::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB3::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB4::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB5::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB6::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB7::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLLB8::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
PLCO::model()->updateAll(array('VISITNUM'=>'V'.$_POST['inputNum']),'SUBJID=:SUBJID AND VISITNUM=:VISITNUM',array(':SUBJID'=>$SUBJID,':VISITNUM'=>$VISITNUM));
错识提示如下:
Fatal error: Maximum execution time of 30 seconds exceeded in D:\web_root\rd1039b\framework\db\CDbCommand.php on line 496
请问YII有其它比较快的更新方法吗?
谢谢!
相关文章
相关视频
专题推荐
-
独孤九贱-php全栈开发教程
全栈 170W+
主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门
-
玉女心经-web前端开发教程
入门 80W+
主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门
-
天龙八部-实战开发教程
实战 120W+
主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论