| @@ 57-59 (lines=3) @@ | ||
| 54 | ||
| 55 | // With the day events taken care off let's cycle through hours |
|
| 56 | while( $data = $results[Event::BAT_HOUR]->fetchAssoc()) { |
|
| 57 | for ($i = 0; $i<=23; $i++) { |
|
| 58 | $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']]['d' . $data['day']]['h'. $i] = $data['h'.$i]; |
|
| 59 | } |
|
| 60 | } |
|
| 61 | ||
| 62 | // With the hour events taken care off let's cycle through minutes |
|
| @@ 61-63 (lines=3) @@ | ||
| 58 | ||
| 59 | // With the day events taken care off let's cycle through hours |
|
| 60 | foreach ($results[Event::BAT_HOUR]->fetchAll() as $data) { |
|
| 61 | for ($i = 0; $i <= 23; $i++) { |
|
| 62 | $db_events[$data['unit_id']][Event::BAT_HOUR][$data['year']][$data['month']]['d' . $data['day']]['h' . $i] = $data['h' . $i]; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| 66 | // With the hour events taken care off let's cycle through minutes |
|