statistics_get($nid)
statistics/statistics.module, line 445
Retrieves a node's "view statistics".
$nid node ID
An array with three entries: [0]=totalcount, [1]=daycount, [2]=timestamp
<?php
function statistics_get($nid) {
if ($nid > 0) {
/* retrieves an array with both totalcount and daycount */
$statistics = db_fetch_array(db_query('SELECT totalcount, daycount, timestamp FROM {node_counter} WHERE nid = %d', $nid));
}
return $statistics;
}
?>