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 8182145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:45:39+00:00 2026-06-07T00:45:39+00:00

Through an API, I am getting following JSON response, status: 550, created: 2012-07-02 19:00:58,

  • 0

Through an API, I am getting following JSON response,

status: "550",
created: "2012-07-02 19:00:58",
reason: "550 #5.1.0 Address rejected. ",
email: "somemail@dummy.org"

I want this response to be saved in to database,

each time database is populated, I need “Created” field, which is infact a timestamp, to be unique, The script I am going to write is basically a cron job, so I dont want to add same record many times in database,

How I can I populate database, based on timestamp?

also, how can I extract bounce code extracted from

reason: "550 #5.1.0 Address rejected. ",

here the bounce code is

5.1.0

guide me please,

  • 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-06-07T00:45:41+00:00Added an answer on June 7, 2026 at 12:45 am

    1 – Avoid duplicate entries

    Make the column unique – Add a UNIQUE index to the timestamp column, so that the database server complains if you are trying to insert the same one again.

    CREATE UNIQUE INDEX name_of_index ON tablename (created);
    

    After this you can INSERT IGNORE INTO or REPLACE INTO the table and it will fail or update the existing row.

    Check if the value exists – You could just execute a query before inserting anything, checking if the timestamp exists.

    SELECT count(created) FROM tablename WHERE created = '2012-07-02 19:00:58';
    

    If the results is > 0 you know that you already have a row with that timestamp so you do not insert. This is safe if noone else puts anything in that DB between your query and insert statement.

    Always delete and insert – A third way is to prophylactically delete all rows with that timestamp and insert a row afterwards.

    DELETE FROM tablename WHERE created = '2012-07-02 19:00:58';
    
    INSERT INTO tablename [...];
    

    But as I do not really get what you are trying to do here, you would need to edit your question and be more concrete.

    2 – extract bounce code

    Depends on what those reasons can look like. You could get to the code by extracting the string between # and the first following space if it is safe to assume that there is no other #. No need for regular expressions here. Or simply refer to André Catita’s answer.

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

Sidebar

Related Questions

Through an API I am getting the JSON response below with a listing of
I am calling a Web API through $.ajax() call. And I am getting the
I am using javascript api to get facebook comments. i am getting the following
I am trying to upload video on cdn server(hwcdn.net server) through api, but getting
I am new in android and i want to do parsing through api and
Through their API Google offers the possibility to search through feeds of Youtube with
Have gone through hibernate api specification on FlushMode but didn't get the exact difference.
In windows is it possible through an API to write to the middle of
I'm trying to search Netflix through their API, but without logging anyone in (because
I am trying to connect to Twitter through REST API using Java. I am

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.