function ip_tracker_ip_user_count in IP address manager 8.2
Same name and namespace in other branches
- 6 ip.module \ip_tracker_ip_user_count()
- 7.2 ip.module \ip_tracker_ip_user_count()
- 7 ip.module \ip_tracker_ip_user_count()
Count how many users have been tracked against an IP.
1 call to ip_tracker_ip_user_count()
File
- ./
ip.module, line 80 - IP address manager module.
Code
function ip_tracker_ip_user_count($ip) {
$sql = "SELECT COUNT(uid) FROM {ip_tracker} WHERE ip = :ip";
$args = array(
':ip' => ip2long($ip),
);
$count = db_query($sql, $args)
->fetchField();
return $count;
}