⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Managing Concurrent Users



HumbleMonk
  • profile picture
  • Member

Posted 26 April 2012 - 16:10 PM

I want to use grocery CRUD in an environment where many users will have access to it. The problem is that this can lead to incorrect data entries.

For example: There is a row with 'Value' = 200. User A starts editing the row and User B comes along at the same time and changes 'Value' to 1000 and presses update. Then User A finally finishes editing and changes 'Value' to 500 and presses update.

User B's changes will be completely lost and only User A's changes will take effect.

I think the best method would be to stop other users from editing the record if someone is currently editing it. Is there any easy way to achieve this?

xxaxxo
  • profile picture
  • Member

Posted 27 April 2012 - 05:31 AM

I don't think it's possible, you have to extend it with some php functions - denying editing if currently somebody is editing and with some ajax or jquery that triggers when somebody hit's the edit button and refreshes all the opened pages for the different users (to adress the idea if somebody opened the list page and just stays like that - and hits edit after 30 mins for example)

mavershim
  • profile picture
  • Member

Posted 28 April 2012 - 02:43 AM

Hi,

maybe add a field on your table that will indicate some using the said row and create a function that will check whether it is being used or not.