- fix the limit on the special awards self nomination query

- add a rollover for regfee items
This commit is contained in:
dave 2008-01-23 18:40:59 +00:00
parent 58df28ba9a
commit 3f3475d407
2 changed files with 13 additions and 1 deletions

View File

@ -45,7 +45,7 @@ function reports_students_award_selfnom_num(&$report, $text, $n)
WHERE projects.id='$text'
AND projects.year='$year'
AND project_specialawards_link.year='$year'
LIMIT $n,$n");
LIMIT $n,1");
echo mysql_error();
$i = mysql_fetch_assoc($q);
return $i['name'];

View File

@ -295,6 +295,18 @@
'".mysql_escape_string($r->required)."',
'".mysql_escape_string($r->ord)."')");
echo i18n("Rolling registration fee items")."<br />";
//award types
$q=mysql_query("SELECT * FROM regfee_items WHERE year='$currentfairyear'");
echo mysql_error();
while($r=mysql_fetch_object($q))
mysql_query("INSERT INTO regfee_items (`year`,`name`,`description`,`cost`,`per`) VALUES (
'$newfairyear',
'".mysql_escape_string($r->name)."',
'".mysql_escape_string($r->description)."',
'".mysql_escape_string($r->cost)."',
'".mysql_escape_string($r->per)."')");
echo "<br />";
echo "<br />";
mysql_query("UPDATE config SET val='$newfairyear' WHERE var='FAIRYEAR' AND year=0");