I’m having trouble getting my head round this problem so the title may be misunderstood!
I have an art gallery website with a mysql database.
everything is fairly straightforward, a subset of column names are
Title, Artist, Medium, Price,…etc
All this works fine. I can display pictures by selecting from any of the columns.
Now I want to add another search based upon the pictures on display at a particular exhibition.
All the present columns have a single entry but the exhibitions column will have many entries. The list of exhibitions will grow at about 15 per year.
My search code is currently:
[php]$data = mysql_query("SELECT * FROM dbase WHERE type=’$type’);[/php]
What I’m looking for is a way to extend this to say
[php] ‘WHERE type=’$type’ & contains = “exhibition name X”’ [/php]
I could use a shorthand name for the exhibitions based upon “year+number” and some character to act as a list delimiter.
Or maybe there is another way, I’m open to suggestions, well, actually I’m getting desperate!