PDA

View Full Version : query - creative suggestions


rayzun
05-13-2005, 01:02 PM
I have a list of peoples surnames in MySQL (approx 500)

Using reg expression - random variable ....
& PHP extension

How can I query the surname field
for 1 surname and do any of the following...

comparison to other surnames for similiarities / ?????

frequency of duplicate letters /
amount of vowels per surname /
surname within a surname /

these are just a few types of result
that I would like to learn about,
which will no-doubt be very interesting.

Tangerine Dream
05-13-2005, 10:39 PM
comparison to other surnames for similiarities / ?????
Hi, check 12.3. String Functions (http://dev.mysql.com/doc/mysql/en/string-functions.html) for SOUNDEX and STRCMP MySQL functions. Note that SOUNDEX also available in PHP

amount of vowels per surname /
This can be written using PHP' preg functions

frequency of duplicate letters /
.....
surname within a surname /
These two are a bit (frequency) and much more complex than "amount of vowels" task , IMHO you need some free/proprietary string processing PHP scripts