result;
//print_r($res);
if (variable_get('statistics_count_content_views', 0)) {
//Insert a new row or update the original one
db_merge('node_counter')
->key(array('nid' => $res[0]->nid))
->expression('daycount', 'daycount + :daycount', array(':daycount' => 1))
->expression('totalcount', 'totalcount + :totalcount', array(':totalcount' => 1))
->fields(array(
'timestamp' => time())
)
->execute();
}
?>
Gösteri