Jump to content

Recommended Posts

I have around 5 tables in a database used in different combinations based on what the user needs to do. The tables are for a group management system. I have split the tables according to how frequently they are used and for what purpose (consolidating them results in more processing to get things done).

 

 

So, for the sake of example, let's say that there are 5 tables, each with a row for each group.

 

There are 10 groups.. Group 1, Group 2, Group 3, etc.

 

Also, there are two users, User A and User B.

 

 

Scenario:

 

User A is is accessing the row for Group 1 on any of the tables, and at the same time, User B tries accessing the row Group 1 on any of the tables. I want to make it so that User B will have to wait until User A's operation is complete before User B can continue with their operation.

 

 

Summary of Objective:

 

Basically, I want to make it so that if a group's row is in use in any of the tables, anyone else wishing to access that group's row in any of the tables will have to wait until the first operation is complete. Things should be running on a first come first serve basis. Also, I want to make it so that php scripts that are trying to access the DB are not aborted if the group's row is in use.. just simply "paused" in a que system, and resumes when the row becomes available.

 

 

I am curious as to some of the solutions that are possible for this scenario. Any help would be greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/186437-preventing-access-to-rows-while-in-use/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.