random module
Moishy Gluck
moishyyehuda at gmail.com
Sun Oct 29 01:10:25 EDT 2006
Hi
I am using the random module to generate a session tracker. I use this code
to generate a random number "random.random() * 10000000000000000" The
session is stored in a mysql database under the field session_id. The
problem is when I try to submit the random number into my database I get
this error
*IntegrityError*: (1062, "Duplicate entry '2147483647' for key 1")
args = (1062, "Duplicate entry '2147483647' for key 1")
With the same number every time. The number being 2147483647. Does eneyone
know what the problem is.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061028/c561c4da/attachment.html>
More information about the Python-list
mailing list