Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-17 Thread Robert Cummings
On Wed, 2008-12-17 at 11:32 +0100, Jochem Maas wrote: sometimes less is more (although oddly more is never less ;-) What about when more is black holes? hmm. I guess that would depend on which side of the event horizon you were at. :-) Is there conservation of reality across the

Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-17 Thread tedd
At 9:23 PM -0500 12/16/08, Robert Cummings wrote: I haven't come accross UUID() before. It looks time based to me. Yeah, it stops the nine month thing. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List

Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-17 Thread Jochem Maas
Robert Cummings schreef: On Wed, 2008-12-17 at 02:03 +0100, Jochem Maas wrote: or just: mysql_query(UPDATE test SET mykey=UUID()); can't see any reason to go down the 'loop the dataset and roll your own much less random, much more likely to collide, unique value' road. Not terribly

[PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-16 Thread franzemmanuel
Hi Rob, You can also use the PHP fonction Uniqid : md5(uniqid(rand(),true)); http://fr3.php.net/manual/en/function.uniqid.php Have a nice day. Zeuf Rob Gould a écrit : I have a mySQL database with 700,000 records in it, which are presently keyed with an auto-increment field. What I'd

Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-16 Thread support
On Monday, December 15, 2008 7:29 PM, gould...@mac.com wrote: I have a mySQL database with 700,000 records in it, which are presently keyed with an auto-increment field. What I'd like to do is create another field with a field where each and every record number has a unique keyvalue.

Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-16 Thread Jochem Maas
supp...@trafficregenerator.com schreef: On Monday, December 15, 2008 7:29 PM, gould...@mac.com wrote: ... ?php error_reporting(E_ALL); ini_set('error_reporting', E_ALL); ini_set('display_startup_errors','1'); ini_set('display_errors','1'); function dec2base($dec) { $digits =

Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-16 Thread Robert Cummings
On Wed, 2008-12-17 at 02:03 +0100, Jochem Maas wrote: or just: mysql_query(UPDATE test SET mykey=UUID()); can't see any reason to go down the 'loop the dataset and roll your own much less random, much more likely to collide, unique value' road. Not terribly random:

[PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-15 Thread Ondrej Kulaty
I use md5(microtime()); -- Ondrej Kulaty Rob Gould gould...@mac.com píse v diskusním príspevku news:1492934866135048840337272044147195196-webm...@me.com... I have a mySQL database with 700,000 records in it, which are presently keyed with an auto-increment field. What I'd like to do is

Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-15 Thread Robert Cummings
On Tue, 2008-12-16 at 07:35 +0100, Ondrej Kulaty wrote: I use md5(microtime()); I applaud the use of PHP on the PHP list... but I think the OP wants an SQL query :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List