/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public function getStats() { $result = $this->fetchAll( $this->select() ->group('DAY(RecordDateTime)') ); // print_r($result); exit(); foreach ($result as $row) { $data['xAxis'][] = "'" . $row->RecordDateTime . "'"; $result2 = $this->fetchRow( $this->select() ->where('DAY(RecordDateTime) = ?', $row->RecordDateTime) ); $data['yAxis'][] = $result2->RecordCount; } return $data; }