gpt4 book ai didi

php - HY000 - 2014 - 当其他未缓冲的查询处于事件状态时无法执行查询

转载 作者:行者123 更新时间:2023-11-29 22:45:44 26 4
gpt4 key购买 nike

语句无法执行(HY000 - 2014 - 当其他无缓冲查询处于事件状态时无法执行查询。考虑使用 PDOStatement::fetchAll()。或者,如果您的代码仅针对 mysql 运行,您可以启用查询通过设置 PDO::MYSQL_ATTR_USE_BUFFERED 进行缓冲 我在 zf2 中运行操作时遇到此错误,如何解决此问题

{$assSub=$this->getTblInstitutesDepartmentsTable()->getAssignedDetails($urlassId);

$request = $this->getRequest();

    if($request->isPost()){
$submittedArray = $request->getPost()->toArray();
$remarks = $submittedArray['remark'];
$grades = $submittedArray['grade'];
$submittedChk =$submittedArray['submitted'];
foreach ($submittedChk as $submitted){
$chksubmitted = 1;
$remark = $remarks[$submitted];
$grade = $grades[$submitted];
$submittedObj = new TblInstitutesDepartmentModel(array('asid' => $sub,'gd_id' => $grd,'rem' => $rem,'is_sub' => $chksub,'sub_date'=>date('Y-m-d')));
$this->getTblInstitutesDepartmentsTable()->updateAssigned($submittedObj); }
}
$view = new ViewModel(array(
'assStd' => $assSub,
'flashMessages' => $this->flashMessenger()->getMessages()
)
);

最佳答案

我只是调用$this->getTblInstitutesDepartmentsTable()->getAssignedDetails($urlassId)来查看模型

// $assSub=$this->getTblInstitutesDepartmentsTable()->getAssignedDetails($urlassId);

$request = $this->getRequest();
if($request->isPost()){

   $submittedArray = $request->getPost()->toArray();

$remarks = $submittedArray['remark'];

$grades = $submittedArray['grade'];

$submittedChk =$submittedArray['submitted'];

foreach ($submittedChk as $submitted){

$chksubmitted = 1;

$remark = $remarks[$submitted];

$grade = $grades[$submitted];

$submittedObj = new TblInstitutesDepartmentModel(array('asid' => $sub,'gd_id' => $grd,'rem' => $rem,'is_sub' => $chksub,'sub_date'=>date('Y-m-d')));

$this->getTblInstitutesDepartmentsTable()->updateAssigned($submittedObj); }
}
$view = new ViewModel(array(
//'assStd' => **$assSub**,
'assStd' => $this->getTblInstitutesDepartmentsTable()->getAssignedDetails($urlassId),
'flashMessages' => $this->flashMessenger()->getMessages()
)
);

关于php - HY000 - 2014 - 当其他未缓冲的查询处于事件状态时无法执行查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29151729/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com