This content has been marked as final. Show 2 replies
I don't see a join between your foodunit and food tables. Would that solve your "infinite amount" problem?
(you can leave out the food table from your select)
Thanks! I didn't think about using a join. Code works now, and is as follows:
SELECT foodunit.name AS display_value, foodunit.foodunitid AS return_value FROM foodunit INNER JOIN food ON food.foodid = foodunit.foodid WHERE foodunit.foodid = :P18_FOODID ORDER BY foodunit.unitorder ASC;