RE: insert random number into table

2009-10-19 Thread Jerry Schwartz
Schwartz Cc: Ray; mysql@lists.mysql.com Subject: Re: insert random number into table I always maintain a timestamp in my random numbers. As long as my precision is higher than my requests per second, wouldn't I be safe from collisions? Assuming a time machine is not invented. [JS] As long

insert random number into table

2009-10-16 Thread Ray
Hello All, I am trying to insert a unique random number* with each row when inserting into a table. I can do it in the application layer (php) but just wondering if there is an easier way in the database layer. Thanks Ray * for example, when registering a person for a contest, I want to give

RE: insert random number into table

2009-10-16 Thread Jerry Schwartz
To: mysql@lists.mysql.com Subject: insert random number into table Hello All, I am trying to insert a unique random number* with each row when inserting into a table. I can do it in the application layer (php) but just wondering if there is an easier way in the database layer. Thanks Ray

Re: insert random number into table

2009-10-16 Thread Ray
[mailto:r...@stilltech.net] Sent: Friday, October 16, 2009 11:43 AM To: mysql@lists.mysql.com Subject: insert random number into table Hello All, I am trying to insert a unique random number* with each row when inserting into a table. I can do it in the application layer (php) but just wondering

RE: insert random number into table

2009-10-16 Thread Gavin Towey
records. Regards, Gavin Towey -Original Message- From: Ray [mailto:r...@stilltech.net] Sent: Friday, October 16, 2009 8:43 AM To: mysql@lists.mysql.com Subject: insert random number into table Hello All, I am trying to insert a unique random number* with each row when inserting

RE: insert random number into table

2009-10-16 Thread Jerry Schwartz
-Original Message- From: Ray [mailto:r...@stilltech.net] Sent: Friday, October 16, 2009 1:10 PM To: mysql@lists.mysql.com Subject: Re: insert random number into table On October 16, 2009 10:57:48 am Jerry Schwartz wrote: There is a RAND function in MySQL, but if you need to guarantee

Re: insert random number into table

2009-10-16 Thread Scott Haneda
[mailto:r...@stilltech.net] Sent: Friday, October 16, 2009 8:43 AM To: mysql@lists.mysql.com Subject: insert random number into table Hello All, I am trying to insert a unique random number* with each row when inserting into a table. I can do it in the application layer (php) but just wondering

Re: insert random number into table

2009-10-16 Thread Scott Haneda
I always maintain a timestamp in my random numbers. As long as my precision is higher than my requests per second, wouldn't I be safe from collisions? Assuming a time machine is not invented. -- Scott Iphone says hello. On Oct 16, 2009, at 11:29 AM, Jerry Schwartz jschwa...@the-infoshop.com

Re: insert random number into table

2009-10-16 Thread Ray
On October 16, 2009 12:29:42 pm Jerry Schwartz wrote: -Original Message- From: Ray [mailto:r...@stilltech.net] Sent: Friday, October 16, 2009 1:10 PM To: mysql@lists.mysql.com Subject: Re: insert random number into table On October 16, 2009 10:57:48 am Jerry Schwartz wrote