I have 4 fields in a row
Ingred1
Ingred2
Ingred3
Ingred4
These could be for ingredients for food, let's say flour, egg, butter and milk.
When somebody submits a recipe it may look something like this:
Ingred 1 = Butter
Ingred 2 = Milk
Ingred 3 = Egg
Ingred 4 = Flour
This is all well and good, but if somebody submits a recipe like this:
Ingred 1 = Butter
Ingred 2 = Egg
Ingred 3 = Milk
Ingred 4 = Flour
It now means that Egg is in both fields Ingred 3 and 2.
I want to run a list of all the ingredients of my site off.
I could use DISTINCT but this would only show me distinct for ingred1 and not overall between the 4 different ingred field.
I would want it to just list the ingredients without repeating like:
Butter
Egg
Flour
Milk
How would I go about this?
Thanks






Bookmarks