diff options
-rwxr-xr-x | mat | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -663,6 +663,9 @@ sub cmd_shoppinglist { for my $recipe (@shop_recipes) { # my $contents = $db->selectall_arrayref("SELECT * FROM contents WHERE recipe_id=".$recipe.";"); my $contents = $db->selectall_hashref("SELECT * FROM contents WHERE recipe_id=".$recipe.";", 'ingredient_id'); + unless (%$contents) { + print "WARNING recipe $recipe contains no ingredients!\n"; + } for my $content ( keys(%$contents)) { # print %$contents, "\n"; my $ingredientcol = $db->selectcol_arrayref("SELECT name FROM ingredients WHERE id=".$content.";"); |