Using this to try and detect if a tweet with the same ID has already been added to the DB (and not add it if it has).
INSERT INTO `Tweets` (`TweetID`, `Time`, `UserName`, `UserNameID`,`RealName`, `ProfilePic`, `Tweet`)
VALUES ('1234567890', 'Fri, 27 Jan 2012 00:29:39 +0000', 'user', '666', 'user', 'http://...' , 'tweet')
ON DUPLICATE KEY UPDATE `TweetID` = '1234567890';
but its still being added.
You need to create unique index that covers single
TweetIDfieldPersonally I’d recommend you to remove
ON DUPLICATEpart and just useINSERT IGNORE INTOinstead – as long as you don’t need anything to be modified in case of duplication