Parsing a search query string and to output an SQL string

From: Date: Sat, 21 Oct 2000 14:24:20 +0000
Subject: Parsing a search query string and to output an SQL string
Groups: php.db 
Request: Send a blank email to php-db+get-3839@lists.php.net to get a copy of this message
Hi! I'm having trouble in parsing a search query string and to output an SQL string. I understand that there are many syntax for a search query (like in search engines), but maybe you know a code that parse one of them. For example: input: "cinema AND (China OR Taiwan)" output: "where field REGEXP ... AND ... blah blah blah" I want to use the output string to search my database which contain the words "cinema" and "China" or which contain the words "cinema" and "Taiwan" anywhere in the field. This is getting more and more complex as we use nesting AND, OR, NOT, parentheses, " Do you ever have a problem like this? Please help me out! Hadinata

« previous php.db (#3839) next »