I want to have a PHP script that updates every column 1 on my user database, and I was thinking about this: If I did a count rows and then updated every row, but then i thought "What if while the update was processing a new user was added, then they wouldn't get updated."
So is there a way to lock the database until its done or something?
Thanks
----
My Project:
I have a security code that is created every X days, and every users password is decrypted with the old code then encrypted with the new code. And then my website uses the new code until a newer one comes up.
MySQL Locking the Database or Table
Moderator: General Moderators
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida