MySQL Locking the Database or Table

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

MySQL Locking the Database or Table

Post by tecktalkcm0391 »

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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Why is this in PHP - Code? Moved to Databases. :roll:
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

Post Reply