This one is going to be very simple for most programmers out there. I need some code to build a query.
The database isnt very big but i need a keyword seach. I want to have a form field where if you enter the text: this is a test string
it will appear like this in the address bar: keywords=this+is+a+test+message.
The php code will then ommit common words like " this, is, a " and will then only search for "test" and "message" through multiple fields. The common words can be hardcoded into the file, e.g. commonwords = ("a, is, that, me, how, do, i")
The php file would probably use the "explode" function to separate the keywords into an array. The the query will look something like this:
$QUERY = "SELECT * from TableName WHERE (FIELD1 like '%".test."%' OR FIELD2 like '%".test."%') and (FIELD1 like '%".message."%' OR FIELD2 like '%".message."%')"
I want this code written in a single php file where if you type [url removed, login to view]
the above query is echoed in the screen. The query needs to have the ability to be easily ajusted for more database fields. There will be about 2 - 5 fields being searched in the database i'm using and the size of the query will automatically be adjusted depending on how many keywords are used. Most of the database fields have 1 - 3 words in them.
I am open to suggestions too.
I can do this right now, and be done within an hour ... I have all instant messengers for easy communication and can code it cleanly with comments to make it easy for you to use (Paypal prefered over SL for pmt)