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!
Search Query Parser beta test
Moderator: General Moderators
-
Rafael Almeida
- Forum Newbie
- Posts: 5
- Joined: Thu Dec 16, 2004 10:21 pm
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).
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).
-
Rafael Almeida
- Forum Newbie
- Posts: 5
- Joined: Thu Dec 16, 2004 10:21 pm