You are here

function _sheetnode_save in Sheetnode 7.2

Same name and namespace in other branches
  1. 5 sheetnode.module \_sheetnode_save()
  2. 6 sheetnode.module \_sheetnode_save()
  3. 7 sheetnode.module \_sheetnode_save()

Helper function to save a sheetnode.

2 calls to _sheetnode_save()
sheetnode_insert in ./sheetnode.module
Implements hook_insert().
sheetnode_update in ./sheetnode.module
Implements hook_update().

File

./sheetnode.module, line 1170
Module file for the sheetnode module.

Code

function _sheetnode_save($nid, $vid, $value) {
  db_delete('sheetnode')
    ->condition('vid', $vid)
    ->execute();
  db_insert('sheetnode')
    ->fields(array(
    'nid' => $nid,
    'vid' => $vid,
    'value' => $value,
  ))
    ->execute();
}