Drupal 7 hook_node_insert

function hook_node_insert($node) {
  db_insert('mytable')
    ->fields(array(
    'nid' => $node->nid,
    'extra' => $node->extra,
  ))
    ->execute();
}
Sleepy Scarab