Forum Moderators: coopster

Message Too Old, No Replies

Hmmm name compare help

         

bobnew32

7:20 pm on Nov 2, 2004 (gmt 0)

10+ Year Member



I have a script that adds celebrities to my database. Each celebrity has a

firstName
lastName

When adding a new celebrity, I have to check to see if their name is related to anything else in the database. Its ok to have more than one celebrity with the SAME EXACT NAME, as they are two different people.

My problem is, how would I get celebrities names that are similar to those that I input? I was thinking of having a soundex for each first and last name, then comparing the two? How would I go about doing this, its frustrating.

DaButcher

7:34 pm on Nov 2, 2004 (gmt 0)

10+ Year Member



[dev.mysql.com...]

hit [ctrl] + [f] and search for: As of MySQL 4.1.1, you can use the VALUES(col_name)

read that example, I guess maybe you can use that function on the fields?

bobnew32

8:10 pm on Nov 2, 2004 (gmt 0)

10+ Year Member



Thats on the insert statement I believe, what i'm doing is preprocessing it before I actually do choose to insert it. The proprocessing is what i'm having trouble on. I want to give the person using the system related celebrity names to what they insert in the system.

DaButcher

9:30 pm on Nov 2, 2004 (gmt 0)

10+ Year Member



ah, now I understand what you want to do..

You want to retrieve the records, where name is LIKE the input name, only it might differ a bit?

I dont know if there is such an function to find similar records.. some kind of dictionary function.

If you just wish to find celebs with same firstname and/or same lastname, it's easy though!

coopster

11:42 pm on Nov 2, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



? [webmasterworld.com]

bobnew32

1:35 am on Nov 3, 2004 (gmt 0)

10+ Year Member



Yes thx for the link, I actually solved it using that same exact method. I just... forgot about it ^^ :) Haha.