RE: [PHP] PHP Boolean Interpreter - Need to search a mySQL database

From: Date: Mon, 13 May 2002 19:48:46 +0000
Subject: RE: [PHP] PHP Boolean Interpreter - Need to search a mySQL database
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-97411@lists.php.net to get a copy of this message
This is no good because it doesn't check for single or double quotes. Inputting anything with quotes gives ugly ugly errors. Plus, Boolean interpreters should group quoted words as a single term. It doesn't check for malicious code input at all. I tried editing it to make it better, but after lots and lots of work, I didn't get very far. If you can fix it up, let me know =) -----Original Message----- From: Richard Archer [mailto:phpgeneral@juggernaut.com.au] Sent: Sunday, May 12, 2002 8:04 PM To: php-general@lists.php.net Subject: Re: [PHP] PHP Boolean Interpreter - Need to search a mySQL database At 4:50 PM -0400 12/5/02, SpamSucks86 wrote: >I was wondering if anyone knew of any good Boolean interpreters (NOT, >AND, OR, +, -, |," ")? I've found three, but they're VERY buggy and I >wouldn't put them into production. Frankly, I don't have the time, >patience, or ability to write a good one from scratch. Here are the >three I've found in case anyone's interested: > >http://www.evolt.org/article/Boolean_Fulltext_Searching_with_PHP_and_My SQL/18/15665/index.html Thanks for that link... that's a great piece of code! With error reporting cranked right up it throws a few warnings, but no errors. It certainly performs as described. The only thing it doesn't seem to do is check for "+". But adding that is a 30 second task. If this isn't good enough for you, just what are you looking for? ...R.

« previous php.general (#97411) next »