Hi I am trying tow rite a search facility (just simple) that can cater for AND, OR, NOT
Basically the client want a single form field where they can type variations of the following (words and phrases)
(please excuse my examples just was trying to think up real ones :()
Quote:
Black AND White
British AND French NOT Scottish
English OR Scottish OR Welsh
|
Basically I would like to end up with a series of AND variables, series of OR and a series of NOT. So that I can make up my SQL query using them.
I wasn't quite sure where to start, as I gathered that I am looking for a reg exp of some sort then placing the AND, OR, NOT into seperate arrays and then creating the SQL query using that?
Good idea bad idea?
Thanks for any thoughts as I am struggling
Or I haven't asked if I can do a drop down box to include the AND OR NOT parts BUT they did draw out what they wanted and that wasn't included, so this is my first option - if its too hard then I will go back to them and alter the page layout.
Thanks
Sarah