Hi,
Is it possible to query a db and from then for say 5 minutes to lock the db? tables are a mixture of innodb and myIsam, if that makes a difference. MySQL 5.0
bazz
| SitePoint Sponsor |




Hi,
Is it possible to query a db and from then for say 5 minutes to lock the db? tables are a mixture of innodb and myIsam, if that makes a difference. MySQL 5.0
bazz
uhmm I think you can't lock a db but you can lock tables.
Don't Panic


okay, i'll bite
why do you want to lock the database?




Hi rudy,
OK, it's for a booking system.
Say, if I get a phone call for a booking and I look at my online booking system, the page may need to be refreshed to show accurate stuff. It may take me a few minutes to discuss the requirements of the customer and I want to make sure that my 'page refresh' doesn't go out of date.
I want to stop it from accepting any new boookings for a few minutes so that any room I want to pick, isn't snuck into by someone else. I suppose it is just an initial plan to prioritise bookings from the business itself.
bazz




why do ideas come to me after I have asked a question.
Maybe I could set a value in the db when I have refreshed the page, from 1 to 0. then I could make the availability to website visitors, conditional on that value being 1?
bazz




Thanks, I'll do it that way as it is simpler, easier than racking my brain and probably, the better way
bazz
Bookmarks