RE: [PHP] searching multiple fields

From: Date: Fri, 15 Jul 2005 20:38:20 +0000
Subject: RE: [PHP] searching multiple fields
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-218775@lists.php.net to get a copy of this message
Yes, hope you are using the MyISAM, full-text index is much better than 'LIKE'. If you use the way like 'name like '$name%' or org like '$name'', it will cost lots of your time... Best regards, Shiqi Yang -----Original Message----- From: Amir Mohammad Saied [mailto:amirmohammadsaied@yahoo.com] Sent: Friday, July 15, 2005 1:51 AM To: php-general@lists.php.net Subject: Re: [PHP] searching multiple fields Brent Baisley wrote: > Sounds like you want to use full text indexing. Create one full text > index spanning name, area, organisation. Then search on all three > fields at once. > SELECT * FROM sheet1 MATCH(name,area,organisation) AGAINST ('textstring* > otherstring* etc*). The * means use LIKE searching. There are a bunch > of other options you can use and also limitations. Read the manual for > all the details. > > > On Jul 14, 2005, at 4:37 AM, Ross wrote: > Just to remember! this method works just with MyISAM table types. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#218775) next »