Page 1 of 1

Adding in database

Posted: Thu Jun 01, 2006 9:57 pm
by tecktalkcm0391
is there anyway to add 1 to the current number in the database, where if another user does it at the same time they both will process?

Posted: Thu Jun 01, 2006 10:02 pm
by PrObLeM
Im pretty sure that when 2 (or more) commands are run at the same time. It locks the database adds 1 to the number, unlocks it then the 2nd command runs and adds 1 to the database, so you don't have anything to worry about.

Posted: Thu Jun 01, 2006 10:13 pm
by tecktalkcm0391
even with a MySQL Database.

Posted: Thu Jun 01, 2006 10:34 pm
by Christopher
tecktalkcm0391 wrote:even with a MySQL Database.
Yes, with most databases writes are what is called atomic -- meaning that each pending write is processed only after the previous one is completed.

Posted: Sat Jun 03, 2006 5:26 pm
by tecktalkcm0391
Is a MyISMA MySQL Table/Database like this?