Two examples of using variables in where clause

Here are two examples of how to use variables to build where clauses. The second one includes how to add a conditional to the where clause, if a second variable isn't false.