Skip to content

Commit

Permalink
Fixed issue #7833: Error "Cannot execute queries while other unbuffer…
Browse files Browse the repository at this point in the history
…ed queries are active" when editing conditions
  • Loading branch information
c-schmitz committed Jun 9, 2013
1 parent d80fc09 commit 0016f52
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions application/controllers/admin/conditionsaction.php
Expand Up @@ -1280,7 +1280,8 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null)
->bindValue(":lang1", $sLanguage, PDO::PARAM_STR)
->bindValue(":lang2", $sLanguage, PDO::PARAM_STR)
->query() or safeDie ("Couldn't get other conditions for question $qid<br />$query<br />");

$aConditionsResult1=$result->readAll(); // Read result into an array to be able to close the resultset to enable further queris

$querytoken = "SELECT count(*) as recordcount "
."FROM {{conditions}} "
."WHERE "
Expand Down Expand Up @@ -1320,7 +1321,7 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null)
{
$aConditionsMerged[]=$arow;
}
foreach ($result->readAll() as $arow)
foreach ($aConditionsResult1 as $arow)
{
$aConditionsMerged[]=$arow;
}
Expand Down

0 comments on commit 0016f52

Please sign in to comment.