[PHP] Unique ID on 5.0.4 (Windows)

2005-09-21 Thread Chris
Hi, Pretty soon I'm going to be needing to generate a unique identifier in a script. I'm looking into how to go about doing it now. It has to work on Apache 2 / PHP 5.0.4 (Module) / Windows 2000 Server. Any suggestions on how I might be able to do it? I've noticed the uuid PECL package,

Re: [PHP] Unique ID on 5.0.4 (Windows)

2005-09-21 Thread Dragan Stanojevic - Nevidljivi
Hi Chris, Chris wrote: Pretty soon I'm going to be needing to generate a unique identifier in a script. I'm looking into how to go about doing it now. It has to work on Apache 2 / PHP 5.0.4 (Module) / Windows 2000 Server. Any suggestions on how I might be able to do it? I'd appreciate any

Re: [PHP] Unique ID on 5.0.4 (Windows)

2005-09-21 Thread Chris
Dragan Stanojevic - Nevidljivi wrote: Hi Chris, Chris wrote: Pretty soon I'm going to be needing to generate a unique identifier in a script. I'm looking into how to go about doing it now. It has to work on Apache 2 / PHP 5.0.4 (Module) / Windows 2000 Server. Any suggestions on how I

[PHP] Unique ID system - need help/ideas

2004-03-10 Thread J J
I was given a database that has uniques IDs such as: AL1 AL2 AR1 AR2 MI1 etc... The first two letters are based on the state they live in, then it would need to look at the next 5 characters to determine the next ID. My problem is how do I recreate this in PHP to make sure

RE: [PHP] Unique ID system - need help/ideas

2004-03-10 Thread Chris W. Parker
J J mailto:[EMAIL PROTECTED] on Wednesday, March 10, 2004 3:46 PM said: Any ideas? Thank you in advance! does it all have to be in the same field? can you not just combine two fields? one field would be called 'id' and it would be auto-incrementing. second field would be 'state' and it

RE: [PHP] Unique ID system - need help/ideas

2004-03-10 Thread J J
I'd like to keep it in one field if possible since that's how their database is now and data will be going back and forth. Plus there should be allowed two of the same numbers, so like: AL3 KY3 So any state with more than one record can be sequential and not jump around like KY3,

RE: [PHP] Unique ID system - need help/ideas

2004-03-10 Thread Chris W. Parker
J J mailto:[EMAIL PROTECTED] on Wednesday, March 10, 2004 4:03 PM said: I'd like to keep it in one field if possible since that's how their database is now and data will be going back and forth. [snip] So any state with more than one record can be sequential and not jump around like

RE: [PHP] Unique ID system - need help/ideas

2004-03-10 Thread J J
Will it be able to figure out what the last number is if it's a character type and the number is something like 3? So it'll add one to make it 4 and not something like 10003. ?? --- Chris W. Parker [EMAIL PROTECTED] wrote: yeah that makes sense. hmm.. well i'll give you my idea..

RE: [PHP] Unique ID system - need help/ideas

2004-03-10 Thread Chris W. Parker
J J mailto:[EMAIL PROTECTED] on Wednesday, March 10, 2004 4:22 PM said: Will it be able to figure out what the last number is if it's a character type and the number is something like 3? So it'll add one to make it 4 and not something like 10003. php knows. you'll just have to

RE: [PHP] Unique ID system - need help/ideas

2004-03-10 Thread Miles Thompson
At 04:10 PM 3/10/2004 -0800, Chris W. Parker wrote: J J mailto:[EMAIL PROTECTED] on Wednesday, March 10, 2004 4:03 PM said: I'd like to keep it in one field if possible since that's how their database is now and data will be going back and forth. [snip] So any state with more than one

RE: [PHP] Unique ID system - need help/ideas

2004-03-10 Thread J J
Yeah thanks for the feedback, I'm already including a primary key auto_increment field in place to tie the tables together with an ID I *know* will be unique. This other ID scheme is just to work within their existing system that uses this. I'm just trying to mirror/maintain that scheme for

Re: [PHP] Unique ID system - need help/ideas

2004-03-10 Thread trlists
On 10 Mar 2004 J J wrote: My problem is how do I recreate this in PHP to make sure any newly added records follow this same unique ID? I haven't played much with these functions but I think for MySQL you'd want something like this, for the state XX (excuse the wrapped lines): if

Re: [PHP] Unique ID system - need help/ideas

2004-03-10 Thread J J
Wow I think you are on to something!!! I'll give it a whirl! Thanks! --- [EMAIL PROTECTED] wrote: On 10 Mar 2004 J J wrote: My problem is how do I recreate this in PHP to make sure any newly added records follow this same unique ID? I haven't played much with these functions but

[PHP] Unique ID - again

2004-02-12 Thread Alex
Hi folks, I'm using usual md5(microtime()); to create IDs, but now I've encountered a problem with that. I need to create explicitly 6 digit unique number(decimal). Yes, I know I can use for/while loop to fill a string with digits, but is it ABSOLUTELY sure that the random will never return same

Re: [PHP] Unique ID - again

2004-02-12 Thread Richard Davey
Hello Alex, Thursday, February 12, 2004, 11:00:41 AM, you wrote: A I'm using usual md5(microtime()); to create IDs, but now I've encountered a A problem with that. I need to create explicitly 6 digit unique A number(decimal). Yes, I know I can use for/while loop to fill a string with A digits,

Re: [PHP] Unique ID - again

2004-02-12 Thread Galen
MySQL (or another SQL database) is the answer. You can check for an existing OR use it's auto_increment or whatever else you like. Create a field to track all this stuff. There is no other way to guarantee that an ID is unique than to check it against existing. Random functions yield random

Re: [PHP] Unique ID

2003-11-12 Thread Marek Kilimajer
Javier Muniz wrote: Neither auto-increment nor sequences allow you to do what you're asking for though, which is like database garbage collection. If you really need something like this you should implement it in a cron job that runs during non-peak hours as it will be quite an expensive

[PHP] Unique ID

2003-11-11 Thread Dimitri Marshall
Hi there, Here's my situation: I'm making a message board and I've decided the best way to go about the structure is to have 3 tables, two of them will be Posts and Replys. Now, in order for this ti work, each post has to have a UniqueID - same with the replys. Looking at another program, I can

Re: [PHP] Unique ID

2003-11-11 Thread Marek Kilimajer
Dimitri Marshall wrote: Hi there, Here's my situation: I'm making a message board and I've decided the best way to go about the structure is to have 3 tables, two of them will be Posts and Replys. Now, in order for this ti work, each post has to have a UniqueID - same with the replys. Looking at

RE: [PHP] Unique ID

2003-11-11 Thread Javier Muniz
it :) -Javier -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 3:30 PM To: Dimitri Marshall Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Unique ID Dimitri Marshall wrote: Hi there, Here's my situation: I'm making a message

Re: [PHP] Unique ID

2003-11-11 Thread Boyan Nedkov
Dimitri Marshall wrote: Hi there, Here's my situation: I'm making a message board and I've decided the best way to go about the structure is to have 3 tables, two of them will be Posts and Replys. Now, in order for this ti work, each post has to have a UniqueID - same with the replys. Looking at

Re: [PHP] Unique ID

2003-11-11 Thread John W. Holmes
Marek Kilimajer wrote: Dimitri Marshall wrote: I'm making a message board and I've decided the best way to go about the structure is to have 3 tables, two of them will be Posts and Replys. Now, in order for this ti work, each post has to have a UniqueID - same with the replys. Looking at another

Re: [PHP] unique id

2003-07-28 Thread Gabriel Guzman
On Sat, 2003-07-26 at 07:11, Curt Zirzow wrote: * Thus wrote jan ([EMAIL PROTECTED]): Hi there! What's the best way to create uids (unique ids) even when runnig at exactly same time (microseconds)? is this enough ??? $r = mt_rand(); $uid = uniqid(getmypid() . $r); If

Re: [PHP] unique id

2003-07-28 Thread Curt Zirzow
* Thus wrote Gabriel Guzman ([EMAIL PROTECTED]): On Sat, 2003-07-26 at 07:11, Curt Zirzow wrote: * Thus wrote jan ([EMAIL PROTECTED]): Hi there! What's the best way to create uids (unique ids) even when runnig at exactly same time (microseconds)? is this enough ??? $r

[PHP] unique id

2003-07-26 Thread jan
Hi there! What's the best way to create uids (unique ids) even when runnig at exactly same time (microseconds)? is this enough ??? $r = mt_rand(); $uid = uniqid(getmypid() . $r); thanks Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] unique id

2003-07-26 Thread Tom Rogers
Hi, Saturday, July 26, 2003, 5:58:41 PM, you wrote: j Hi there! j What's the best way to create uids (unique ids) even when runnig at j exactly same time (microseconds)? j is this enough ??? j $r = mt_rand(); j $uid = uniqid(getmypid() . $r); j thanks j Jan I use: $id =

Re: [PHP] unique id

2003-07-26 Thread Curt Zirzow
* Thus wrote jan ([EMAIL PROTECTED]): Hi there! What's the best way to create uids (unique ids) even when runnig at exactly same time (microseconds)? is this enough ??? $r = mt_rand(); $uid = uniqid(getmypid() . $r); If you're running a cluster of machines I would include information

[PHP] unique id

2002-10-29 Thread Edward Peloke
How do I generate a uniqueid in php? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] unique id

2002-10-29 Thread 1LT John W. Holmes
How do I generate a uniqueid in php? www.php.net/uniqid ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] unique id

2001-01-10 Thread Richard Lynch
just use auto_increment. - Original Message - From: AJDIN BRANDIC [EMAIL PROTECTED] Newsgroups: php.general Sent: Tuesday, January 09, 2001 11:14 AM Subject: [PHP] unique id Hi again, I am generating a randum number but before inserting it into a table I want to make sure that onother