Database problem
| From: | Mike Carter | Date: | Wed, 15 Jan 2003 16:45:47 +0000 |
| Subject: | Database problem | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-3311@lists.php.net to get a copy of this message | ||
Hi guys,
Okay, I admit this is not strictly a PEAR class related problem - but I
figured there is enough brain and experience on here, somebody might have
come across the same problem and found a solution, or workaround.
Anyway, here's the problem:-
When two people read the same database record out and have it displayed in
their 'browser.
Then person one makes changes and submits it back to the database - updating
the row.
Then person number 2 makes changes to his (now out of date) copy and submits
it back to the database, effectively overwriting the update done by the
other person!
Any ideas or experience with such a problem?
My first idea was to have a field for every row in every table which holds a
version number - this gets incremented when somebody writes an update back
over it. Before writing over it the version number of the data to be
written and the version number of the existing record in the dbase are
compared.
Hmmm... What do people think?
I look forward to any thoughts and suggestions on such a subject.
--
Mike Carter [web developer]
tel: 01925 758229 // fax: 01925 758023 // web: www.koa.uk.com
This message is confidential.
Unless you are the named addressee or their delegated representative you may
not use, disclose, or copy the contents of the e-mail. If you are not the
named addressee please notify the sender immediately and delete the material
from your computer. Any views or opinions contained in this e-mail are
solely those of the author unless expressly stated otherwise
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________