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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:26:34+00:00 2026-06-13T07:26:34+00:00

I asked this question before and people gave me a solution to my problem

  • 0

I asked this question before and people gave me a solution to my problem but now my problem has changes. Before I had a table called rooms in my database. It had a hold field where when someone is making a reservation, i put a time 15 mins in the future to keep it for that user. The room becomes available again if that user doesn’t finish the reservation in 15 mins. It was the solution to my previous problem.

But now I no longer have a rooms table. I only have roomtype and reservations table. Roomtype got name price info # of rooms and of course id fields. The reservations table got checkin checkout roomtypeid and info about the user. Since I don’t have the rooms table I can’t figure out a way to prevent multiple users from booking a single room at the same time.

My question is how can I prevent race conditions without the rooms table? If it is not too much to ask I would like the solution to be only sql and php.
Here is a link to my previous question

EDIT: I found this post and that’s why I don’t have the rooms table anymore. link

  • 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-13T07:26:35+00:00Added an answer on June 13, 2026 at 7:26 am

    you can add a temporary reservation to the reservations table (with a temp-flag/field) and remove that later if the reservation is not finished after 15 minutes.

    additionally if multiple users try to reserve the last room very simultaneously you should again check the availability in every step of the reservation to notify users that the last room has just been taken and propose another roomtype etc.

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

Sidebar

Related Questions

Now I know this basic question has been asked before, but I must be
This question has been asked before but i still don't understand it fully so
Maybe this question has been asked many times before, but I never found a
I know this sort of question has been asked before , but I still
I suspect this question has been asked before, but it's not easy to Google
I asked this question before but the problem is I get one response and
I believe lot of people already asked this question before, but i kept getting
This question has been asked before, but I would like a little more detail
Ok, I see that people have asked this question before, but I'm seeing some
I'm sorry if this question has been asked before, but I'm not even sure

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.