Re: MySQL 3.23.22 PHP 4 search engine
| From: | Graeme Merrall | Date: | Thu, 26 Oct 2000 02:22:11 +0000 |
| Subject: | Re: MySQL 3.23.22 PHP 4 search engine | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-3915@lists.php.net to get a copy of this message | ||
On Wed, Oct 25, 2000 at 05:14:59PM -0600, Bert Goodman wrote:
> I'm in the process of developing an e-commerce site and would like to use PHP to
> maintain and access my database. I've been looking for a good premade search engine and
> can't seem to find one that supports MySQL 3.23.22 and PHP4. Is it absoutly necessary to use a
> search engine that was written with these two packages or could I use one that uses older version of
> MySQL and PHP? Any help would be GREATLY appreciated.
Hi.
While there are no search algorithms written using PHP4 and mySQL that I
know of (like classes) etc you can use mySQL 3.23's text matching syntax
which may be of use.
From the mySQl manual
mysql> CREATE TABLE t (a VARCHAR(200), b TEXT, FULLTEXT (a,b));
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO t VALUES
-> ('MySQL has now support', 'for full-text search'),
-> ('Full-text indexes', 'are called collections'),
-> ('Only MyISAM tables','support collections'),
-> ('Function MATCH ... AGAINST()','is used to do a search'),
-> ('Full-text search in MySQL', 'implements vector space model');
Query OK, 5 rows affected (0.00 sec)
Records: 5 Duplicates: 0 Warnings: 0
mysql> SELECT * FROM t WHERE MATCH (a,b) AGAINST ('MySQL');
Cheers,
Graeme
--
Turn on, dial in, geek out...