Ok, so on my site we have a filter section where a user can select to filter through games by either the game's genre or the model that the game will play on.
I'm trying to write a query that will query the database and filter it by genre if genre is the only set item, filter it by model if model is the only set item, or filter both if they're both set. I want the code to be efficient as well so if you know a good method on doing this that would be great to hear.