#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Php and mongodb synchronization


    Hi,
    I have a website with volunteers that help to translate the website to other languages.
    I am working with php along with Mongodb ,
    how can I sync a collection update ?
    for example :
    2 volunteers wants to update the same record in a collection and enter in the same time .. they are both see the same translation now .. if someone has update the record while the other one is still working .. I want to prevent the other from updating and ruin the previous update made the the first user .
    thanks ahead
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,619
    Rep Power
    595
    Assuming you are using PDO, you want to use PDO transaction based coding.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.

IMN logo majestic logo threadwatch logo seochat tools logo