You are here

function recipe_insert in Recipe 7.2

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

Implements hook_insert().

Insert a new recipe into the database.

File

./recipe.module, line 96
Contains functions for Recipe node CRUD and display.

Code

function recipe_insert($node) {
  db_insert('recipe')
    ->fields(array(
    'nid' => $node->nid,
    'yield' => $node->recipe_yield,
    'yield_unit' => $node->recipe_yield_unit,
  ))
    ->execute();
}