table locking
Posted: Thu Aug 05, 2004 4:10 am
Hi all
I am new and learning php - I know all of the basics but wanted to ask about table locking. I was thinking how a say warehouse app would be written if it was done in php.
I know record locking can be done but not sure how it works in reality. Say I am the first person to ask for stock - lets say that the transaction takes a while and a second person wants stock. Now does their script have to wait - (appears to be taking a long time to load to the user) until the unlock. Or does the script accept the request straight away and the database queues the request?. If it is the later then how does the user know what has happened. Technically if the first person has had the last of the stock then the second person should be told storry no stock (they would be if they had to hold waiting) However if the transaction was accepted and queued then the second person would assume that they have got stock when they havent.
Can anyone advise please
I am new and learning php - I know all of the basics but wanted to ask about table locking. I was thinking how a say warehouse app would be written if it was done in php.
I know record locking can be done but not sure how it works in reality. Say I am the first person to ask for stock - lets say that the transaction takes a while and a second person wants stock. Now does their script have to wait - (appears to be taking a long time to load to the user) until the unlock. Or does the script accept the request straight away and the database queues the request?. If it is the later then how does the user know what has happened. Technically if the first person has had the last of the stock then the second person should be told storry no stock (they would be if they had to hold waiting) However if the transaction was accepted and queued then the second person would assume that they have got stock when they havent.
Can anyone advise please