I'm building a flight search page to display flights from the MySQL database onto a results page for a virtual airline I'm trying to start up for MS Flight Sim. My search page has 4 list menus: Origin City, Destination City, Aircraft, and Carrier. Each menu has an "any" option, so, i.e., if the user does not select an aircraft type, flights will be displayed with all aircraft types, only filtering based on the other parameters. I can build a simple MySQL query to filter using only one of the parameters, however if the SQL query filters using all of them and one of the fields has "any" selected the search will not work. The only solution I see is to write 16 if then statements (all of the possible combinations of menu selections) and 16 different SQL statements. Is there a better way to do this?