-bill
web-dev wrote:
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 search form as constructed, the user can select or enter search criteria information in from one to all of the available search criteria. Using the truncated criteria list as an example, if the user selected 1)new 2) power boats and left the 3) make text box empty, AND, and the whole query, fails because the WHERE make like '$make' condition returns false, I think. Please correct me if I'm wrong! I want and need to understand this..
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php