View Single Post
Old 10-09-2012, 09:00 PM   PM User | #3
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,187
Thanks: 59
Thanked 3,995 Times in 3,964 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
An easier way: Since you are using LIKE '%xxx%' in all your tests, just use <option value="">Any</option> in the HTML.

That will cause your query to become (for example)
Code:
SELECT * FROM delyn WHERE description LIKE '%%' AND ...
and so of course it will match ANY description.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote