function boost_stats_update_node_counter in Boost 6
Same name in this branch
- 6 stats/boost_stats.ajax.inc \boost_stats_update_node_counter()
- 6 stats/boost_stats.php \boost_stats_update_node_counter()
2 calls to boost_stats_update_node_counter()
- boost_stats.php in stats/boost_stats.php
- Place in webroot, for faster stats if needed.
- boost_stats_ajax_callback in stats/boost_stats.ajax.inc
- AJAX Menu Callback.
File
- stats/boost_stats.php, line 130
- Place in webroot, for faster stats if needed.
Code
function boost_stats_update_node_counter() {
global $nid;
db_query('UPDATE {node_counter} SET daycount = daycount + 1, totalcount = totalcount + 1, timestamp = %d WHERE nid = %d', time(), $nid);
if (!db_affected_rows()) {
db_query('INSERT INTO {node_counter} (nid, daycount, totalcount, timestamp) VALUES (%d, 1, 1, %d)', $nid, time());
}
}