[thelist] [MySQL] - REPLACE or INSERT IGNORE

Tris beertastic at gmail.com
Tue Feb 27 08:47:19 CST 2007


Morning all..!
i'm importing data from a csv file.
No worries, but oneof the fields I wanna import is an email address..
BUT, if the address already exists, I don't wanna bother.

To that end, I made the email column my index for the table, and used:
REPLACE INTO imported_newAffiliates (`emailAddress`, `signUpDate`)
VALUES('tijansarr at hotmail.com', '2007-01-14 11:42:24')

and yet it's still duplicating the data

Duplicates are unlikley, but I'd like to be safe...

Anyone care to tell me what I'm doing wrong?

Tris...


-- 
When a person can no longer laugh at himself, it is time for others to
laugh at him.
Thomas Szasz



More information about the thelist mailing list