Re: running number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux