Re: text search in database

From: Date: Wed, 02 Jun 2004 09:11:34 +0000
Subject: Re: text search in database
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187431@lists.php.net to get a copy of this message
Vincent DUPONT wrote:
Hi, I need to do a text search on some fileds in a database. I would like the users to be able to use some syntax like 'AND' 'OR' 'NOT' parentheses () and quotes to make their search queries more powefull. I face 2 problems : 1. parse the query 2. execute the search (create the appropriate SQL query) Do you known of any existing package that could parse such a syntax and /or generate some kind of sql query? tank you, vincent
MySQL has a FULLTEXT index type which might provide what you need. I'm also using a program called SWISH-E (http://www.swish-e.org/) to index my website but it also allows you to index data from any source by using a custom spider. You could set this to extract data from your database in the correct format for indexing. Mike

« previous php.general (#187431) next »