I am trying to match the text in a column in one table, to part of a string in a column of a second table, if there is a match an image will be output on my webpage. Below is an example
Products
ID | Prod_Code | Colours
1 100 Yellow, Orange, Navy
Colours
ID | Colour | Image Link
1 Yellow Yellow swatch image
2 Orange Orange swatch image
What I am trying to achieve is that if the products.colours contains the text "yellow" the yellow swatch image will appear on the screen, same for orange etc.
I know that the table should be normalised for best practice but unfortunately this was not designed by me and there are time constraints.
Any help would be much appreciated.