Get rid of PHP warnings.
This commit is contained in:
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user