Could someone please tell me why the following query won't work
select DISTINCT get_unit(unit) as unit, get_ingredient(ing) as ing, get_ing_aisle(1,ing) as aisle from recipe_ing where recipe in(1084, 1086, 1012, 618) and qtydec>0 and ing not in(select ing from excluded_ing where owner=1) order by aisle
You seem to be mixing up the parameters for get_ing_aisle.