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

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

2002-05-29 Thread Peter
the 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 more work. You can use

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

2002-05-29 Thread John Holmes
... -Original Message- From: Peter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 9:38 PM To: Php Subject: RE: [PHP] generating next number... from db extraction unfortunately they want letters in it ... I know it would be easier to hav auto_incroment.. and wish I could just leave

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's the what they don't

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