Færdiggjort

114740 workout search php/mysql code

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.

Evner: Lidt af Hvert, MySQL, PHP

Se mere: this is a search, text string search, string search in c, some search string, search text string, search string in c, search string in array, search string c, search string, search for it programmers, search for a programmers, search c string, programmers search, php code search mysql database, m string, how to search for programmers, how code, c string search, c search string, common string

Om arbejdsgiveren:
( 5 bedømmelser )

Projekt ID: #1860905

Tildelt til:

fusiontksl

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)

$20 USD in 0 dage
(0 bedømmelser)
0.0