function recipe_ingredient_match in Recipe 6
Same name and namespace in other branches
- 7.2 recipe.admin.inc \recipe_ingredient_match()
- 7 recipe.module \recipe_ingredient_match()
Fetch an ingredient.
Parameters
$recipe_ingredient_name: A string representing a recipe_ingredient_name.
Return value
A recipe_ingredient array upon successful load or FALSE
3 calls to recipe_ingredient_match()
- recipe_link in ./
recipe.module - Implementation of hook_link().
- recipe_mastercook4_import_single in plugins/
recipe_mastercook4.module - recipe_plaintext_import in plugins/
recipe_plaintext.module - Parsing instance for plain text recipes
File
- ./
recipe.module, line 1667 - recipe.module - share recipes
Code
function recipe_ingredient_match($recipe_ingredient_name) {
$result = db_query("SELECT id, name FROM {recipe_ingredient} where name='%s'", $recipe_ingredient_name);
while ($row = db_fetch_object($result)) {
return array(
'id' => $row->id,
'name' => $row->name,
);
}
return FALSE;
}