function visitors_get_hits_count in Visitors 7.2
Get hits count from current data range.
Return value
int hits count
2 calls to visitors_get_hits_count()
- visitors_browser in reports/
browser.inc - Display browser report.
- visitors_platform in reports/
platform.inc - Display platform report.
File
- reports/
platform.inc, line 14 - Platform report for the visitors module.
Code
function visitors_get_hits_count() {
$query = db_select('visitors', 'v');
$query
->addExpression('COUNT(*)', 'count');
visitors_date_filter_sql_condition($query);
$result = $query
->execute();
return (int) $result
->fetchColumn();
}