At 11:53 AM 11/29/2004, you wrote:
On 11/29/04 12:27 PM, "mos" <[EMAIL PROTECTED]> wrote:
> Mike,
>Your solution is way too complicated (it makes my head hurt).
> Try this:
>
> set @n=0;
> update tmp set rnd = @n := @n + 1 order by RAND()
>
> Mike
I'll give this a shot. Follow-up question:
On 11/29/04 1:26 PM, "Rhino" <[EMAIL PROTECTED]> wrote:
> I don't think this is a question about SQL at all; I think you already know
> how to write the SQL to select, insert, update or delete rows.
>
> I think that what you really want to know is if there is a more efficient
> way to shuffle you
- Original Message -
From: "Mike Zornek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 29, 2004 12:08 PM
Subject: SQL question.... Trying to improve upon my PHP solution.
> I have a table of members, about 13,000 rows.
>
> Each night
On 11/29/04 12:27 PM, "mos" <[EMAIL PROTECTED]> wrote:
> Mike,
>Your solution is way too complicated (it makes my head hurt).
> Try this:
>
> set @n=0;
> update tmp set rnd = @n := @n + 1 order by RAND()
>
> Mike
I'll give this a shot. Follow-up question:
I've had a lot of trouble with
At 11:08 AM 11/29/2004, you wrote:
I have a table of members, about 13,000 rows.
Each night I need to shuffle the table. I have a small int column called
random_position. Currently I am creating a position list (based on the count
of the members), shuffle it, then while iterating through the member
I have a table of members, about 13,000 rows.
Each night I need to shuffle the table. I have a small int column called
random_position. Currently I am creating a position list (based on the count
of the members), shuffle it, then while iterating through the members
assigning them a a position.
$t