Jump to content


Photo

identical sql records


  • Please log in to reply
2 replies to this topic

#1 StirCrazy

StirCrazy
  • Members
  • PipPipPip
  • Advanced Member
  • 75 posts

Posted 04 October 2006 - 02:19 AM

Hi folks,

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?



#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 04 October 2006 - 02:38 AM

To give an idea of the scope of the problem, does this database have 10 records or 10 million records .. or something in between.
Legend has it that reading the manual never killed anyone.
My site

#3 StirCrazy

StirCrazy
  • Members
  • PipPipPip
  • Advanced Member
  • 75 posts

Posted 04 October 2006 - 03:05 AM

Thanks AndyB,

It's relatively small; about 9000 members (guessing about 2000 duplicates).

S.C>




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users