RE: [PHP] Re: Auto Incrementing in PHP

2003-01-19 Thread Don Read
On 19-Jan-2003 Don Mc Nair wrote: > Thanks Guys > > I just needed a pointer. I decided to use the database and created two > tables, one for invoice number and one for order number then defined a > function to read the current number and the increment it. > That'll work, but it's not atomic. At

[PHP] Re: Auto Incrementing in PHP

2003-01-19 Thread Don Mc Nair
Thanks Guys I just needed a pointer. I decided to use the database and created two tables, one for invoice number and one for order number then defined a function to read the current number and the increment it. // GET AUTO NUMBER and creates the next one // uses the parameter tablename as $table

[PHP] Re: Auto Incrementing in PHP

2003-01-18 Thread Bobby Patel
One quick note, if you DO NOT have access to a database, you could store that incremented number to a file. And open and retrieve, and increment every time you need. If you need to take this approach checkout php.net and search for "fopen". "Don Mc Nair" <[EMAIL PROTECTED]> wrote in message [EMA