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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:57:24+00:00 2026-06-03T06:57:24+00:00

I am worried I am not doing this correctly. Currently I have implemented a

  • 0

I am worried I am not doing this correctly. Currently I have implemented a drag and drop interface for a table of database data using jQuery UI’s drag and drop functionality. On updating the order, I have a callback function make an ajax call sending the element’s position to a php script. Based on the element’s position, php recalculates the position of all the other items and updates their positions in the MySQL database.

My fear is that a user could reorder the list too quickly and cause the items in the database to be updated by php before they were finished being updated from the previous request, causing incorrect data. Is this a problem? Should I implement some way to queue up ajax requests until the previous one is complete? I’m wondering if there is some best practice for updating a database with ajax and making sure that the update is complete before updating the same item again.

  • 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-03T06:57:25+00:00Added an answer on June 3, 2026 at 6:57 am

    It seems that the answer is dependent on the implementation of your MySQL database. If you’re using InnoDB then use Transactions.

    Hopefully this thread will provide a solution to your problem.
    How to deal with concurrent updates in databases?

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

Sidebar

Related Questions

I'm a bit worried if this function sends emails that can be recognized correctly
i'm using this example implementation found at http://tangentsoft.net/wskfaq/examples/basics/select-server.html This is doing most of what
I'm using mysql with django 1.3 and I have posts stored in a database.
I'm not sure if there is a simple way of doing this, but is
I have designed a comment system. This is what I am basically doing. $story=$_POST['story'];
I'm wondering that how much worried I should be about data types. I can
I have finally got in my mind what worried me about Dependency Injection and
I'm considering using the Google Contacts API for a webapp, but I'm worried that
I have a string like this: // string1 horse|cow|goat|zebra| and another string like this:
I'm currently self-studying C for mastering an university project. In that project we have

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.