Skip to content

Commit

Permalink
Dev Fixed update error
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jan 16, 2018
1 parent fff2189 commit 2a8d5f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/helpers/update/updatedb_helper.php
Expand Up @@ -982,7 +982,7 @@ function db_upgrade_all($iOldDBVersion, $bSilent = false)
dropPrimaryKey('answers');

addColumn('{{answers}}', 'aid', 'int');
$dataReader = $oDB->createCommand("select qid, code from {{answers}} group by qid, code")->query();
$dataReader = $oDB->createCommand("select qid, code, scale_id from {{answers}} group by qid, code, scale_id")->query();
$iCounter = 1;
while (($row = $dataReader->read()) !== false) {
$oDB->createCommand("update {{answers}} set aid={$iCounter} where qid={$row['qid']} and code='{$row['code']}' and scale_id='{$row['scale_id']}'")->execute();
Expand Down

0 comments on commit 2a8d5f9

Please sign in to comment.