HINT:
I have used PERL to generate random numbers and then do a SELECT on the
auto_increment field in the mysql table, thus generating random picks from
my tables;
I'll be glad to bet informed of better ways around, though :)

Thanks
Aman Raheja
AGF Inc.

----- Original Message -----
From: "Tue Tønning" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 05, 2003 1:38 PM
Subject: RAND() Problems in mysql version 3.23.54 and 3.23.55 (linux)


> Hey,
>
> I have discovered a strange error in the mysql versions mentioned in subj.
>
> Example.
> A table with 10 entries ...i want to draw 3 randomly
> => "select fieldName from tableName order by RAND() limit 3"
>
> this have worked for the last year or so.....but after upgrading our
redhat
> 7.2 with mysql version 3.23.54 it stopped to work. It always chooses the
> same 3 entires.
>
> using a Seed doesnt make it perfect either (i know that the manual says
that
> RAND() isnt perfect - but now it doesnt work at all).
>
> A quick search on google says me that im not the only one having the
> problem. I can also see on some Danish messageboards that other have the
> same problems with the new version.
>
> So my question is .....What to do ?
> I cant imagine that you have removed the functionality of RAND from mysql
> again ?
> i know its only been in there since early ~3.23....
>
> I work professionally as a webdevolper (CEO of a firm) and we need to find
a
> solution to this problem badly.
>
> I hope you can guide me to a solution. Cause i would hate to change all
the
> sql calls in the projects we have coded the last 1½ year.... and it would
be
> nice to know if we would be able to use RAND() in the future.
>
> Ohh, yeah - we code in PHP......and i have talked today with 3 other
> webdevelopment companies that have been struggeling with the same error
> after upgrading.
>
> Med venlig hilsen / Best regards
>
> Tue Tønning
> --------------------
> AT-Orbital I/S
> Helsingforsgade 27, 1
> DK-8200 Aarhus N
> Denmark
> Phone +45 8942 5860
> Web   www.atorbital.com
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to