我的数据库中有 500 个条目。在我的后端,我有行动。例如:
public function executeMyAction(sfWebRequest $request) {
// Get some data from table
$templates = Doctrine_Core::getTable('SeoTemplates')->findOneByEntity('training');
//Get data from other table(500 items)
$trainings = Doctrine::getTable('Training')->getTraining();
// Make some operations with data
foreach ($trainings as $training) {
$training->setSomeValue1('some_data');
$training->setSomeValue2('some_data');
$training->setSomeValue2('some_data');
}
// Problem part (try to save)
$trainings->save();
}
save() 执行了很长时间。如何解决这个问题呢?是否可以?
在我的问题部分,我有所有已知的错误致命错误:超过 30 秒的最大执行时间