Re: design question
| From: | Steve Edberg | Date: | Sun, 10 Sep 2000 04:50:47 +0000 |
| Subject: | Re: design question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16030@lists.php.net to get a copy of this message | ||
At 12:16 AM +0300 9/10/00, Meir kriheli wrote:
On Sat, 09 Sep 2000, Chuck Barnett wrote: I am looking for advice on how to do something. I am designing an art site that will have (hopefully) between 500 and 1000 artists displaying their work on it. The delima I am having is how do I let the user select by artist name in my Search form. A list box wouldn't be of any use here with that large a number of names. Does anyone have a suggestion? I could let the user just type in the last name but then there is the whole spelling issue. Thanks for any suggestions. Chuck You can offer a search by typing the last name, or search from a list of the artists. Arrange the list with alphabetical order, each page dedicated to the first letter in the family name of the artist.Also, you can use soundex() for a 'fuzzy' name search: see http://www.php.net/manual/function.soundex.php This is available in at least 3.0.11 and beyond (the manual says 3.0.16 and beyond, but I've been using it since 3.0.11). In PHP4, there are two more sophisticated algorithms available: metaphone() - http://www.php.net/manual/function.metaphone.php - and levenshtein - http://www.php.net/manual/function.levenshtein.php If you use MySQL as your database, it has an extended SOUNDEX() function: http://www.mysql.com/documentation/mysql/commented/manual.php?section =String_functions - steve
Meir Kriheli MKsoft computer systems "There's someone in my head but it's not me" - Pink Floyd+--- "They've got a cherry pie there, that'll kill ya" ------------------+
| Steve Edberg University of California, Davis | | sbedberg@ucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ |+-------------------------------------- FBI Special Agent Dale Cooper ---+