I have been given a project where there are multiple categories stored in a row in a comma delimited list (e.g. 1,2,3). Then I have a categories table that has categories that looks like this:
ID ShowcaseCategory DisplayOrder
1 Member's Work 0
2 Eastern Resorts 1
3 WesternResorts 2
4 Products 4
5 Nordic Skiing 3
I want to be able to pull the ShowcaseCategory (from above) from the table based on more than one value in the comma delimited list. For example, if the category contained 1,5 I would get Member’s Work and Nordic Skiing.
I think I need to get it in an array, possibly explode it and be able to do some join on the ID to get the (literal) ShowcaseCategory. Or, is there an easier way to do this?
In the end I want to dynamically build a list of checkboxes of Categories so they can be updated.
All help is appreciated