function devel_generate_add_statistics in Devel 6
Same name and namespace in other branches
- 8.3 devel_generate/devel_generate.module \devel_generate_add_statistics()
- 8 devel_generate/devel_generate.module \devel_generate_add_statistics()
- 8.2 devel_generate/devel_generate.module \devel_generate_add_statistics()
- 7 devel_generate/devel_generate.inc \devel_generate_add_statistics()
- 4.x devel_generate/devel_generate.module \devel_generate_add_statistics()
Generate statistics information for a node.
Parameters
$node: A node object.
1 call to devel_generate_add_statistics()
File
- ./
devel_generate.inc, line 412
Code
function devel_generate_add_statistics($node) {
$totalcount = mt_rand(0, 500);
$daycount = mt_rand(0, $totalcount);
$timestamp = time() - mt_rand(0, $node->created);
db_query('INSERT INTO {node_counter} (nid, daycount, totalcount, timestamp) VALUES (%d, %d, %d, %d)', $node->nid, $daycount, $totalcount, $timestamp);
}