Re: [PHP] generating next number... from db extraction

2002-05-29 Thread Tom Rogers
Hi You could use the auto increment feature of mysql and store the prefix and suffix as seperate fields in the database like idnum|prefix|suffix|data 1234:abc|A Then just add them together to form the complete order number. Tom At 10:27 AM 30/05/2002 +1000, Peter wrote: >hi, > >I'm

RE: [PHP] generating next number... from db extraction

2002-05-29 Thread Peter
Thanks for your help John that works really well :) Cheers Peter -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: Thursday, 30 May 2002 12:08 PM To: 'Peter'; 'Php' Subject: RE: [PHP] generating next number... from db extraction Okay...here&#x

RE: [PHP] generating next number... from db extraction

2002-05-29 Thread John Holmes
happy b/c it looks like they want and you'll be happy b/c you're using an auto_increment column. ---John Holmes... > -----Original Message----- > From: Peter [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 29, 2002 9:38 PM > To: Php > Subject: RE: [PHP] generating next num

RE: [PHP] generating next number... from db extraction

2002-05-29 Thread Peter
update ... -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: Thursday, 30 May 2002 11:22 AM To: 'Peter'; 'Php' Subject: RE: [PHP] generating next number... from db extraction Why does it have to be letters and numbers? You're just making

RE: [PHP] generating next number... from db extraction

2002-05-29 Thread John Holmes
Why does it have to be letters and numbers? You're just making more work. You can use an auto_increment field and not worry about it (assuming MySQL). You can also use uniqid() and md5() to make a unique string, but it'll be 32 characters long. Maybe crypt() is 16 characters...dunno, but you cou