Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace Transactions with Atomic Operations?

Status
Not open for further replies.

Legshot

Programmer
Sep 25, 2003
3
AT
I've read about it in the Documentation but I'm not sure how I can replace transactions with locks or atomic operations.

I have an app written in PHP which sometimes needs more stuff than just a query done in one script. To be sure that no corrupted data or incomplete data is saved in the db when a users kills the browser while the script is executing I use transactions (right now with postgresql, but I want to change to mysql;).

So how can I do it with atomic ops or locks?

Thanks in advance!
 
Thanks, but I know about that. The documantation says that atomic operations are faster and as good as transactions so I'm curious on how I would solve my problem without transactions.

Is it even possible?
 
I want to be sure that no incomplete updates are done because of a user interrupted PHP script (which does some queries, updates, inserts or whatever which all rely on each other)

With transactions I commit the changes permanent when everything went fine and on the end of a script. Is it possible to do this with atomic ops or not?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top