Jump to content
  • Advertisement
Sign in to follow this  

MySQL Query Sync Question/ Issue

This topic is 4723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm build a small website, and this issue has plagued my mind. I have the following steps: 1) Check if a certain item already exists in the DB 2) If not, then insert new item As you can guess, between steps 1 and 2, there might be some other thread running the same query, and both run step 1, and in truth there is no such item on the DB, and then both execute step 2, inserting 2 equal items on the DB, and therefore currupting it's contents with invalid data... How can I solve this issue between multiple threads running on the server? (I'm using wamp: windows, apache, php4 and mysql). Thanks for any tips on this.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!