Skip to content

Commit

Permalink
Activation now makes the "id" field of the survey responses table a u…
Browse files Browse the repository at this point in the history
…nique index (important for importing results)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@1202 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Sep 20, 2004
1 parent afae046 commit ad5a964
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/activate.php
Expand Up @@ -171,6 +171,7 @@
{
$fieldlist[]=$fielddata['fieldname'];
}
$fieldlist=array_reverse($fieldlist); //let's always change the later duplicate, not the earlier one
$checkKeysUniqueComparison = create_function('$value','if ($value > 1) return true;');
$duplicates = array_keys (array_filter (array_count_values($fieldlist), $checkKeysUniqueComparison));
foreach ($duplicates as $dup)
Expand Down Expand Up @@ -354,7 +355,7 @@
if ( substr($createsurvey, strlen($createsurvey)-2, 2) != ",\n") {$createsurvey .= ",\n";}
}
//$createsurvey = substr($createsurvey, 0, strlen($createsurvey)-2);
$createsurvey .= " INDEX(id)\n";
$createsurvey .= " UNIQUE(id)\n";
$createsurvey .= ") TYPE=MyISAM;";
//echo "<pre style='text-align: left'>$createsurvey</pre>\n"; //Debugging info

Expand Down

0 comments on commit ad5a964

Please sign in to comment.