Go Back   Velocity Reviews > Newsgroups > Python
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Python - Re: Seeding the rand() Generator

 
Thread Tools Search this Thread
Old 08-02-2009, 11:37 PM   #1
Default Re: Seeding the rand() Generator


On Sun, 02 Aug 2009 14:18:28 -0700, Fred Atkinson
<> declaimed the following in
gmane.comp.python.general:

> I am coding in Python.
>
> I am accessing a MySQL database.
>
> I have a string to instruct the MySQL database to use the
> 'rand()' function to randomly choose one of the records in the
> database.
>

Which still doesn't tell us if you are using Python's random number
generator, or MySQL's random number generator. Show us some code and we
might be able to tell...

However, from the old MySQL brown book:

RAND()
RAND(N)
Returns a random floating-point value in the range 0 to 1.0. If an
integer argument N is specified, it is used as the seed value.
--
Wulfraed Dennis Lee Bieber KD6MOG

HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: web-)
HTTP://www.bestiaria.com/



Dennis Lee Bieber
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46