identify deliberate double entries
I have a MySQL database collecting names, adresses etc. This is for sending free samples. I have stated that there is only one sample pr. address. But some deliberately misspell their address. Is it possible to make a script that can show adresses (and names) which look alike? Thanks for your help. (It is only possible to apply once pr. email.)
Try SELECT with LIKE string comparison...
There is a solution for your problem:
You need to customize a SELECT statement to match your search criteria; ether for e-mail adress or name or both or more...
It goes somewhat like this: SELECT name, email FROM yourdatabase WHERE email LIKE '%e%mail%'
Of course you have to customize your search parameter (where '%' is the wildcard in SQL).
Yet your sort&display problem is not solved... to display you need a PHP script which utilizes this querry-string. You have a little programming task to handle, because the script is easy to code but if you do it sloppy it will be a time-wasting process on you machine. Each entry has to be compared, this can easily get out of hand in a db with several hundrets or even thousands of entries...
Find more info at:
http://www.mysql.com/doc/en/String_c...functions.html
&
http://sqlcourse.com/select.html
Re: Try SELECT with LIKE string comparison...
Thanks for your quick reply. I will give your idea a try - and let you know what happens.
I will hopefully soon get back
Best regards
Henrik