You have it right. But if the user searches for new power boats, and
doesn't specify a make, make should not appear in your WHERE clause. The
query has to be different depending on the criteria that have been
chosen (or not chosen, as the case may be). Prior to executing the
query, look at all
Bill Lovett wrote:
Hello,
You're getting all new boats + all sail boats + all boats of type x
because you're using ORs. If you only want records that match all the
criteria, use ANDs instead.
If I use AND, wouldn't all conditions need to be true to return a
result? In the case of the