I've built several web sites where the user could search the MySQL database, but never one as complex as this, and I could use a little insight from someone who's been there.
This is a searchable eyewear catalog that I'm adding to an existing website. I have a search form containing multiple criteria that the user can choose to search with. For example, the user can search by brand, gender, temple size, bridge size, etc., or ANY combination.
I'm using PHP/MySQL and having a problem writing the query to search the proper columns in the table based on which fields the user filled in on the search form. Would I just go with a lot of nested conditionals? It seems that there must be a better way, but I can't think what it is. I've got a ton of MySQL/PHP books, but none of them look at this problem (you would think a catalog search using multiple optional criteria would be a common need).
Any help or pointers to tutorials would be appreciated.