In one of my programs I started to receive database errors for not having a
unique id. I generate unique ids for each of the mysql lines that I add to
the database. I realized that the perl variable $idNum was keeping the same
random string for multiple executions.
I created a test program to demo
On Sat, May 15, 2010 at 4:03 PM, Anthony Esposito
wrote:
> In one of my programs I started to receive database errors for not having a
> unique id. I generate unique ids for each of the mysql lines that I add to
> the database. I realized that the perl variable $idNum was keeping the same
> random
Perrin Harkins wrote:
On Sat, May 15, 2010 at 4:03 PM, Anthony Esposito
wrote:
In one of my programs I started to receive database errors for not having a
unique id. I generate unique ids for each of the mysql lines that I add to
the database. I realized that the perl variable $idNum was keepin
Adam Prime wrote:
Perrin Harkins wrote:
On Sat, May 15, 2010 at 4:03 PM, Anthony Esposito
wrote:
In one of my programs I started to receive database errors for not
having a
unique id. I generate unique ids for each of the mysql lines that I
add to
the database. I realized that the perl variab
On Sat, 15 May 2010 22:03:50 +0200, Anthony Esposito
wrote:
In one of my programs I started to receive database errors for not
having a unique id. I generate unique ids for each of the mysql lines
that I add to the database. I realized that the perl variable $idNum was
keeping the same r
On 05/15/2010 04:47 PM, André Warnier wrote:
A tip : to get a really unique identifier
Another tip: to get a really unique identifier use mod_unique_id or
Data::UUID or the UUID() function in mysql.
--
Michael Peters
Plus Three, LP
Thank you everyone for helping me, I am surprised by the support our there
for mod_perl.
Cosimo sent me a quick fix to add to the startup.pl file, I have tested and
verified it. The code below works with no problems after adding:
my $srv = Apache2::ServerUtil->server;
$srv->push_handlers(
PerlC
PS.
I had to strengthen the srand() function I added to the startup.pl that
Cosimo suggested. I used the example from the perldoc and have not had any
duplicate keys so far. I was having upwards of 3 per 1000 when using
srand(time ^ $$)
Fix added to startup.pl file
---