I am trying to research how to impliment MySQL 4.X's FTS (Fulltext Search) into my LAN-based invoicing system.

GOAL: When cashier enters name of customer, instead of just entering the customers name and assigning a customer number ( cust_id ), I want to query the database first and make sure I'm not creating a duplicate entry. I also want to use FTS to allow my accountant to find customers based on firstname/lastname using various spelling variations in the instance that she does not know the correct spelling.

In addition, my boss, who enters invoices from time to time, is a notorious fat-fingerer ( almost as bad as me ) and so spelling errors are common. I want to be able to query the database, and present him, and me for that matter, with a perspective list of customers already in the database. This functionality will present us with the choice of choosing a customer from a list, or go on to create a new entry.

So if we type "Marey", the search will try to find an exact match, and if none is available, will search again to return (assuming similar names are already in the db) results like "Marie", "Mary", "Marcy", etc.

I've been researching levenshtien(), soundex(), and metaphone() as well, but I'm not sure how to implement those functions. However, from what I understand (which may be totally wrong ) MySQL's FTS should be able to accomplish my goal natively. Since I only need to search simple strings as opposed to entire phrases, the solution should be rather simple, right? Could someone post some examples, or at least point me in the right direction? I've learned much in the last few days, but I'm still not sure how to actually do this.

PS: Hope this was the right forum Semantically, I'm talking about MySQL, but if this post should have been somewhere else, I apologize