forked from science-ation/science-ation
When setting a score to zero, really make it null.
This commit is contained in:
parent
384efa3363
commit
cbbb0ebca0
@ -41,8 +41,14 @@
|
||||
$curr_team = $_POST['score_count'];
|
||||
while($curr_team > 0) {
|
||||
if($_POST["team_" . $curr_team . "_score"] != "") {
|
||||
$score = $_POST["team_" . $curr_team . "_score"];
|
||||
if($score == 0) {
|
||||
$score = "NULL";
|
||||
} else {
|
||||
$score = mysql_real_escape_string($score);
|
||||
}
|
||||
mysql_query("UPDATE judges_teams_timeslots_projects_link
|
||||
SET score=" . mysql_real_escape_string($_POST["team_" . $curr_team . "_score"]) .
|
||||
SET score=" . $score .
|
||||
" WHERE judges_teams_id = " . mysql_real_escape_string($_POST["team_" . $curr_team . "_id"]) .
|
||||
" and projects_id =$project_id and year=$year");
|
||||
echo mysql_error();
|
||||
|
Loading…
Reference in New Issue
Block a user