Justin
06-21-2007, 02:26 PM
I am writing a script that will automatically be run once a day, and this script will intended to reset variables in a user table.
Is there a way or something I should do to prevent a user doing something that would allow the site from trying to edit the user table during this time...
Like is there a way i can somehow request exclusive access to the database and then wait for any pages that are still running talking to the database to finish (and putting any request during this time in a queue after the reset script), once they finished the reset script will go in and do its stuff and then when it is done the rest of the pending scripts would resume.
Is there a way or something I should do to prevent a user doing something that would allow the site from trying to edit the user table during this time...
Like is there a way i can somehow request exclusive access to the database and then wait for any pages that are still running talking to the database to finish (and putting any request during this time in a queue after the reset script), once they finished the reset script will go in and do its stuff and then when it is done the rest of the pending scripts would resume.