Encerrado

Turn a user entered query string into a mySQL query...

Hello!

Without getting too fancy, I want to be able to take a query string like you might enter into a search engine and convert it to a mysql query string.

For example, if we're querying the field 'contents' :

cars cows fish -- returns rows where contents has either %cars%, %cows% or %fish% in it

"cars" cows fish -- rows that have cars, %cows% or %fish%

+cars cows fish -- rows that have %cars% AND cows or fish

+cars -cows fish -- must have %cars%, mustn't have %cows%, may have %fish%

"cars cows fish" -- rows that have the phrase 'cars cows fish'

... or any combinations.

I want a function thus:

modSM_query_convert($query_string,$field)

{

// etc

return $formatted_query

}

To the function we'll pass the $query_string and the field we're querying on - e.g.

$str=modSM_query_convert('+cars +cows','contents');

.. the function will return something like:

(contents like '%cars%' AND contents like '%cows%')

.. for us to then use in our calling function.

As a small extra, remove any nasty looking characters from the string before processing it (e.g. *'s, ?'s etc)

That's all!

Chris

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.

3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).

## Platform

Linux / PHP / Apache / MySQL

Habilidades: Vale Tudo

Ver mais: want a buyer, turn to 10, to string, string the, string search in c, string processing in c, string i, string 2, search string in c, search string c, search string, search c string, n query, c string search, c search string, contents of a will, where fish, turn by turn, str, mysql query, cows, mysql characters, php remove query string, working string, string search

Acerca do Empregador:
( 65 comentários ) United Kingdom

ID do Projeto: #2990210

4 freelancers estão ofertando em média $33 para este trabalho

stanishjohnd

See private message.

$29.75 USD in 14 dias
(12 Comentários)
2.7
mohammadmus

See private message.

$25.5 USD in 14 dias
(0 Comentários)
0.0
tongsvw

See private message.

$51 USD in 14 dias
(0 Comentários)
0.0
prasanna123

See private message.

$25.5 USD in 14 dias
(0 Comentários)
0.0