Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7178369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:54:27+00:00 2026-05-28T16:54:27+00:00

Using this to try and detect if a tweet with the same ID has

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:54:28+00:00Added an answer on May 28, 2026 at 4:54 pm

    You need to create unique index that covers single TweetID field

    CREATE UNIQUE INDEX uq_tweets_tweetid ON tweets (tweetid)
    

    Personally I’d recommend you to remove ON DUPLICATE part and just use INSERT IGNORE INTO instead – as long as you don’t need anything to be modified in case of duplication

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using something like this: try: # Something... except Exception as excep: logger = logging.getLogger(component)
I'm using this code and I'm beyond frustration: try { $dbh = new PDO('mysql:dbname='
I am currently using code similar to this: try { // IE ONLY var
when using this method public List<Field> getFieldWithoutId(List<Integer> idSections) throws Exception { try { Connection
if in a literal object i try to reference a function using this inside
When I try to login to this site using my yahoo openid, it takes
I try to get this following url using the downloadURL function as follows: http://www.ncbi.nlm.nih.gov/nuccore/27884304
I'm using Google Translate API, and if I try to translate Mc Donald's this
Following the advice of wcoenen, I've decided to try using registration-free COM. This works
I detect this using strace: 8480 execve(/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld, [ /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld, ... -L/home/bjack/lib, ... -rpath-link, /root/src/firmware/Bj-bg/ab-BJ-gameprom-modules/src/dispatcher/logic,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.