I have a table which contains organizations address and the service they provide. Organization Area Service A Place1 x y z B Place2 y
I've managed to write the sql to select records that provide a certain service and in a certain area. SELECT * FROM tablename WHERE services LIKE '%varservices%' AND Area ='varArea' ORDER BY Organization ASC
I have a search page which lets users search by service provided and area. Area choices are "place1" "place2" etc. What I would now like to add to my search is when someone enters "any area" as search parameters it returns all the records. Any help would be appreciated.
The best way would be to build the WHERE statement on the fly. Check for values in each search field, if its there then add this to the serch, if its not there then go and check the next search option.
This thread is now locked and can not be replied to.