I can't get an efficient solution, the sql query to be generated by input
keywords should be boolean.
The input value should be splitted boolen like Google, they are
with all the words, with the exact phrase, with at least one of the words,
without the words..
an example input is :: america,asia bush OR kerry "iraq  war" -democrat
SQL Where condition:
WHERE (message LIKE %america% AND message LIKE %asia%) OR (message LIKE
%bush% OR message LIKE %kerry%) AND message LIKE %iraq  war% AND NOT LIKE

Anyone has a code for this purpose?

"Murat Biyikli" <[EMAIL PROTECTED]> wrote in message
> I need to split the keyword on search input and generate an sql query,
> for ex:   the input value is:   europe+america,asia
> so I want to generate an sql like this:
> SELECT * FROM mytable WHERE message LIKE %europe% AND message LIKE
> OR message LIKE %asia%
> The + (plus) means AND and , (comma) means OR. Also I need to control
> variables to prevent error on sql query forexample an input value like:
> ,,,europe+america,+asia+    should not generate an error.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to