MySQL START Transaction and COMMIT occurring seperately

Codes here !

Moderators: egami, macek, gesf

Post Reply
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Tue Oct 09, 2012 8:38 am

I may be wrong, but I don't think that you can do it that way. One thing you can do though, is add a field to your record that says who is editing it. Then your SELECT statement that populates the rows for other visitors would just have to be modified to grab where that field is null, and a check to give them the row already assigned to them if there is one. Then you can have a cron job run every minute or two and null that field out for users not logged in. Your updates should all happen at once, not one at a time where you would need to use a transaction for a single record update.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests