function recipe_update in Recipe 5
Same name and namespace in other branches
- 6 recipe.module \recipe_update()
- 7.2 recipe.module \recipe_update()
- 7 recipe.module \recipe_update()
Implementation of hook_update().
As an existing node is being updated in the database, we need to do our own database updates.
File
- ./
recipe.module, line 96 - recipe.module - share recipes for drupal 5.x
Code
function recipe_update($node) {
db_query("UPDATE {recipe} SET source = '%s', yield = '%s', notes = '%s', instructions = '%s', preptime = '%d' WHERE nid = %d", $node->source, $node->yield, $node->notes, $node->instructions, $node->preptime, $node->nid);
recipe_save_ingredients($node);
}