You are here

function nodeviewcount_db_insert_node_view in Node view count 7

Same name and namespace in other branches
  1. 7.3 model/nodeviewcount.db.inc \nodeviewcount_db_insert_node_view()
  2. 7.2 model/nodeviewcount.db.inc \nodeviewcount_db_insert_node_view()

Insert node view.

Parameters

int $nid: The viewed node.

int $uid: The user who viewed node.

Return value

bool|int Count written records or FALSE.

1 call to nodeviewcount_db_insert_node_view()
nodeviewcount_insert_node_view in includes/nodeviewcount.api.inc
Insert node view.

File

model/nodeviewcount.db.inc, line 14

Code

function nodeviewcount_db_insert_node_view($nid, $uid) {
  $fields = array(
    'nid' => $nid,
    'uid' => $uid,
    'timestamp' => REQUEST_TIME,
  );
  return drupal_write_record('nodeviewcount', $fields);
}