note 9928 added to soundex
| From: | anthony at n dot o dot s dot p dot a dot m dot trams dot com | Date: | Sat, 02 Dec 2000 04:58:50 +0000 |
| Subject: | note 9928 added to soundex | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8339@lists.php.net to get a copy of this message | ||
SOUNDEX is particularly useful when dealing with a database that also has this function. ORACLE and
InterBase as well as many others support.
Instead of having the database convert both sides, like:
$stmt = "SELECT * FROM STAFF WHERE SOUNDEX ( FIRST_NM ) = SOUNDEX ( 'Coupland' )
;" ;
You could let PHP do one side, like:
$stmt = "SELECT * FROM STAFF WHERE SOUNDEX ( FIRST_NM ) = " . soundex (
'Coupland' ) . " ;" ;
Thereby taking half the load even though its really doesnt take much load in the first place.
http://www.php.net/manual/function.soundex.php