You are here

private function statspro::get_data_uwarning in Statistics Pro 6

Same name and namespace in other branches
  1. 6.2 statspro.inc \StatsPro::get_data_uwarning()

Returns the number of warnings generated by authenticated users per day since the last run.

File

./statspro.inc, line 643
statspro class for statistics pro module.

Class

statspro
Manages the data saving and retrieval according to the user defined parameters.

Code

private function get_data_uwarning() {
  $result = db_query('SELECT COUNT(*) AS num, DATE(FROM_UNIXTIME(timestamp)) AS dategroup
        FROM {watchdog}
        WHERE severity = %d
          AND timestamp >= %d
          AND uid > 0
        GROUP BY dategroup', WATCHDOG_WARNING, $this->last_run);
  while ($row = db_fetch_array($result)) {
    $this
      ->add_day_data($row['dategroup'], $row['num']);
  }
}