function recipe_update in Recipe 7.2
Same name and namespace in other branches
- 5 recipe.module \recipe_update()
- 6 recipe.module \recipe_update()
- 7 recipe.module \recipe_update()
Implements hook_update().
As an existing node is being updated in the database, we need to do our own database updates.
File
- ./
recipe.module, line 112 - Contains functions for Recipe node CRUD and display.
Code
function recipe_update($node) {
db_update('recipe')
->fields(array(
'yield' => $node->recipe_yield,
'yield_unit' => $node->recipe_yield_unit,
))
->condition('nid', $node->nid)
->execute();
}