I've been trying to convert a Mysql database to work from a crappy old script that had a habit of inserting duplicate records.
I want a little bit of code that goes through and checks that each email address on each account is unique. If there is more than one account using the same email address I want to:-
echo "Email address " . $email . " is associated with account numbers: " . $list_of_accounts_ids;
the records are in:- select id,email from users
Can anyone help?