I have an image gallery that I want to add very basic tagging capability to. I've added the tags as rows in mysql columns. The person uploading an image can input 4 tags for their images. So they might tag images like this
Format: tag1 | tag2 | tag 3 | tag4
Image 1: tiger | india | boat |flight
Image 2: duck | waterfowl | sunset | zoo
Image 3: india | tiger | hotel | dusk
If someone wants to search on pictures of tigers, then I want images 1 & 3 to show up. But the problem is that because tiger is stored in column 'tag1' in picture 1, and column 'tag3' in image I can't figure out a select statement that searchs all 4 columns and returns a result from any of the column if a match is found.