Page 1 of 1

Search Query Parser beta test

Posted: Tue Dec 21, 2004 10:49 pm
by Rafael Almeida
Hello guys!

I created a SQL Query Parser to process user-friendly search queries (like Google's) to a mySQL WHERE clause to be appended to a SELECT statement so that it searches the database for the data the user has entred.
There's a very similar paid product on the web, the SQL Query Parser PHP Edition. You can take a look at it here.
My script, however, is free. I would like you guys to beta test it. You can view (and copy) the code on the beta page if you want.
Take a look:

http://www.idealguide.net/cms/search/beta/?english

Post any bugs you find in this topic and enjoy the script!

Posted: Wed Dec 22, 2004 4:08 am
by onion2k
Not bad.

One thing though.. I searched for "fibble OR fobble AND fubble". Logically I would assume that the code should search for something that matched "fibble" or "fobble and fubble" as I specifically stated "fobble AND fubble". Your code searchs for "fibble and fubble" or "fobble". Theres a few different ways you can semantically parse a query with both an OR and an AND. Your way isn't wrong exactly, its not the way I'd do it. It breaks down to guessing whether I meant:

(fibble OR fobble) AND fubble

or

fibble OR (fobble AND fubble)

Personally, I think the second one as thats closer to the mathmatical way of doing things (assuming AND is equivalent to multiply).

Posted: Wed Dec 22, 2004 8:42 pm
by Rafael Almeida
Thanks, I'll be thinking about a way to do that. :D