You are here

function data_node_add in Data 6

Add a relationship between a data table and a node.

1 call to data_node_add()
data_node_add_page in data_node/data_node.module
Page callback for adding.

File

data_node/data_node.module, line 308
Hooks and API functions for Data Node module.

Code

function data_node_add($table, $id, $nid) {
  $save = array(
    'data_table_name' => $table
      ->get('name'),
    'id' => $id,
    'nid' => $nid,
  );
  return drupal_write_record('data_table_node', $save);
}