| 1 |
<?php |
<?php |
| 2 |
// $Id: user_stats.module,v 1.2.2.16.2.19 2009/02/14 21:50:09 liammcdermott Exp $ |
// $Id: user_stats.module,v 1.2.2.16.2.20 2009/02/23 22:21:05 liammcdermott Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 96 |
} |
} |
| 97 |
// Check cache. |
// Check cache. |
| 98 |
if (user_stats_cache_get($type, $uid) === FALSE) { |
if (user_stats_cache_get($type, $uid) === FALSE) { |
| 99 |
$query = db_query("SELECT MAX(ip_address) |
$query = db_query("SELECT ip_address |
| 100 |
FROM {user_stats_ips} WHERE uid = %d |
FROM {user_stats_ips} WHERE uid = %d |
| 101 |
ORDER BY first_seen_timestamp", $uid); |
ORDER BY first_seen_timestamp LIMIT 1", $uid); |
| 102 |
user_stats_cache_set($type, $uid, db_result($query)); |
user_stats_cache_set($type, $uid, db_result($query)); |
| 103 |
} |
} |
| 104 |
return user_stats_cache_get($type, $uid); |
return user_stats_cache_get($type, $uid); |