It would seem useful to have a flag added to each item that indicates if that item is an ingredient in a recipe. It's been about two decades since I've dealt with databases, but it'd seem fairly easy to do a globally set the flags to false, then search of all recipies records and for each ingredient set that item's flag to true.
Then when you display the page for an item, if that flag is true include the 'Find recipes that use this item', otherwise print a little message indicating the item isn't used in any known recipies.
Then when you display the page for an item, if that flag is true include the 'Find recipes that use this item', otherwise print a little message indicating the item isn't used in any known recipies.
Comment