Hello,
I am attempting to search a table based on information passed from a
submitted form.
The form contains details as follows:
(radio buttons)
Condition: O new O used
Type: O power O sail
(textbox)
Make: [ ]
etc. etc. etc. ( it's a long list!)
If I write a query ie.
Select from boat where condition like '$condition' or type like '$type'
or make like '$make' etc......
I get a search result that includes boats with any of the criteria that
match one of the like comparisons,
ie.returns all new boats + all sail boats + all boats of type X
which makes sense
What I really want is a result that is limited to a group of boats that
individually match the submitted criteria but excludes the boats outside
the set ie. returns only boats which are new, sail, type X boats.
If anyone can help me with sage advice on how to go about achieving this
end, I would be highly grateful. I am stuck and may be missing something
simple, or maybe there is more to what I am attempting than a simple
query. Either way, pointers, tips, sample queries would be helpful and
appreciated.
Kris O.
---------------------------------------------------------------------
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
- Re: Problem with Query based on HTML form values web-dev
- Re: Problem with Query based on HTML form values Bill Lovett
- Re: A Query problem wcb
- Re: A Query problem Peter Brawley