Modified several clauses in getWhereClauses and populateCriteriaFromRequest

Make them match the form, and the database.