function _drd_server_count_watchdog in Drupal Remote Dashboard Server 6.2
Same name and namespace in other branches
- 7.2 drd_server.module \_drd_server_count_watchdog()
Parameters
int $severity:
int $period:
Return value
int
1 call to _drd_server_count_watchdog()
File
- ./
drd_server.module, line 1006
Code
function _drd_server_count_watchdog($severity, $period) {
if (!module_exists('dblog')) {
return 0;
}
if ($period) {
return db_result(db_query("SELECT COUNT(wid) FROM {watchdog} WHERE severity = %d AND timestamp >= %d", $severity, REQUEST_TIME - $period));
}
else {
return db_result(db_query("SELECT COUNT(wid) FROM {watchdog} WHERE severity = %d", $severity));
}
}