diff --git a/functions/functions.php b/functions/functions.php index 750d41a..43e7da7 100644 --- a/functions/functions.php +++ b/functions/functions.php @@ -28,6 +28,10 @@ function get_aggregation(mysqli $db, string $table, $date): array $value_result = $db->query($value_query); $values = []; + $values['avg_meter'] = 0; + $values['avg_power'] = 0; + $values['avg_feed'] = 0; + $values['avg_production'] = 0; while ($row = $value_result->fetch_assoc()) { $production = ($row['production_eg'] + $row['production_og']); $values['date'][] = $row['date'];