You are here: Re: [PHP] running number « PHP « IT news, forums, messages
Re: [PHP] running number

Posted by Richard Davey on 07/25/05 13:28

Hello Roger,

Monday, July 25, 2005, 10:21:54 AM, you wrote:

RT> I am quite new at all these stuff and would like to seek your
RT> advise on the *recommended way* of achieving this. I am thinking
RT> along these lines:
RT> a) store that number (12345) in a table
RT> b) a user registers and assign that number to him
RT> c) increment number to 12346
RT> d) process repeats for the next registration

RT> Concern: How do tell mySQL to lock the 'number' table when a
RT> new registration process is about to take place. Is locking the
RT> best option here or is/are there better ways?

Do you HAVE to have a "starting off" number of 12345? If there is no
real reason to do this, then use an auto-increment column in MySQL and
let that do all the hard work for you!

Best regards,

Richard Davey
--
http://www.launchcode.co.uk - PHP Development Services
"I do not fear computers. I fear the lack of them." - Isaac Asimov

 

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

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