You are here: Re: Mutex access on a database? « PHP Programming Language « IT news, forums, messages
Re: Mutex access on a database?

Posted by Bill Godfrey on 10/12/33 11:26

gordon@hammy.burditt.org (Gordon Burditt) wrote:
> If you perform a query like:
> update foo set bar=bar+1 where id = '$userIdx';

Ah ha. I must confess, I only know SQL from cribbing the commands
phpMyAdmin creates. I didn't realise you could do that.

> it should be atomic in the database without the need for explicit
> locks, as it's all done in one SQL statement.

If the database server (MySQL) will enforce atomic access, thats perfect.

> If your abstractions provide only the ability to read and write
> things, not atomic increments and decrements, perhaps your design
> needs changing.

I'm still in the poke-about-with-prototype-code phase, so no worries.
Thanks.

Bill, incremental.

--
http://billpg.me.uk/ usenet(at)billpg(dot)me(dot)uk

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация