Fix a bug that prevented judging questions from being added

Fixed a bug when rolling over fair years with configuration variables not coming over properly
This commit is contained in:
james 2006-10-30 20:03:38 +00:00
parent 4727c65cca
commit 19c5c43b87
2 changed files with 4 additions and 2 deletions

View File

@ -68,9 +68,11 @@
$q=mysql_query("SELECT * FROM config WHERE year='$currentfairyear'"); $q=mysql_query("SELECT * FROM config WHERE year='$currentfairyear'");
echo mysql_error(); echo mysql_error();
while($r=mysql_fetch_object($q)) while($r=mysql_fetch_object($q))
mysql_query("INSERT INTO config (var,val,description,year) VALUES ( mysql_query("INSERT INTO config (var,val,category,ord,description,year) VALUES (
'".mysql_escape_string($r->var)."', '".mysql_escape_string($r->var)."',
'".mysql_escape_string($r->val)."', '".mysql_escape_string($r->val)."',
'".mysql_escape_string($r->category)."',
'".mysql_escape_string($r->ord)."',
'".mysql_escape_string($r->description)."', '".mysql_escape_string($r->description)."',
'".mysql_escape_string($newfairyear)."')"); '".mysql_escape_string($newfairyear)."')");

View File

@ -173,7 +173,7 @@ function questions_update_question($qs, $year)
function questions_save_new_question($qs, $year) function questions_save_new_question($qs, $year)
{ {
mysql_query("INSERT INTO questions ". mysql_query("INSERT INTO questions ".
"(question,type,section,db_heading,required,ord,year) VALUE(". "(question,type,section,db_heading,required,ord,year) VALUES (".
"'".mysql_escape_string($qs['question'])."',". "'".mysql_escape_string($qs['question'])."',".
"'".mysql_escape_string($qs['type'])."',". "'".mysql_escape_string($qs['type'])."',".
"'".mysql_escape_string($qs['section'])."',". "'".mysql_escape_string($qs['section'])."',".