You are here

function _sheetnode_template_save in Sheetnode 5

Same name and namespace in other branches
  1. 6 sheetnode.module \_sheetnode_template_save()
  2. 7.2 sheetnode.module \_sheetnode_template_save()
  3. 7 sheetnode.module \_sheetnode_template_save()
2 calls to _sheetnode_template_save()
sheetnode_insert in ./sheetnode.module
Implementation of hook_insert().
sheetnode_update in ./sheetnode.module
Implementation of hook_update().

File

./sheetnode.module, line 708

Code

function _sheetnode_template_save($vid, $name, $value) {
  db_query("DELETE FROM {sheetnode_template} WHERE vid=%d", $vid);
  db_query("INSERT INTO {sheetnode_template} (vid, name, value) VALUES (%d, '%s', '%s')", $vid, db_escape_string($name), serialize(_sheetnode_sanitize_js($value)));
}