diff --git a/app/scripts/functions.php b/app/scripts/functions.php index 4283191..b036eab 100644 --- a/app/scripts/functions.php +++ b/app/scripts/functions.php @@ -235,6 +235,9 @@ function update_points($con, $s_id) { $factor = $results[0]['erg']/ 15.0; foreach($results as $row) { $points = round($row['erg']/$factor); + if ($points == 0 && $row['erg'] != 0) { + $points = 1; + } change_points($con, $row['m_id'], $s_id, $points); } }