如我要更新很多表时,网页容易超时
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有其它比较快的更新方法吗?
谢谢!
回复讨论(解决方案)
没人回答,算了,还是用存储过程吧。
set_time_limit(0) 不限时