Re: Anoter explaination of my problem

From: Date: Fri, 26 Apr 2002 03:20:02 +0000
Subject: Re: Anoter explaination of my problem
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-13322@lists.php.net to get a copy of this message
Dude... if you use LOCK TABLE WRITE (not READ) on the table.. it will STAY locked.. until you give the UNLOCK command. It completely solves any concurrency issues. This is a fundamental database issue and MySQL is meant to handle it. :) -Mike At 05:19 PM 4/25/02 -0400, Matt Babineau wrote:
thread1 ----> updates and increments a numebr in the DB thread2 ----> does the same thing as thread one thread1 ----> reads the database to get the new value for display on the web page thread2 ----> also reads the database for the new updated value. so thread1 displays "2" and thread2 displays "2" also because thread1 could not read the database value before thread2 updated the value. Matt Babineau Freelance Internet Developer e: <mailto:mbabineau@illuminatistudios.com> mbabineau@illuminatistudios.com p: 603.943.4237 w: <http://www.illuminatistudios.com/> http://www.illuminatistudios.com
-- Mike Flynn -- mike @ mikeflynn . net home => work => home => shop => home [adbusters]

« previous php.windows (#13322) next »