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 your rows and that is more a question of choosing a good
> programming algorithm and plugging in the SQL you already know.
> 
> I have to admit I'm curious about why you need to do this. In many years of
> database work, I've never seen the need to "shuffle" a table before. By the
> way, could you clarify what you mean by "shuffle"? Do you mean that you want
> to completely randomize every row and put it in some new, randomly-chosen
> "slot" within the table? Or are you only moving the bottom row to the top
> and pushing each of the others down one slot?

The basic problem is this. We have a search engine that lets photo buyers
search our db for photographers. Rather than sort on name the results have
always by default been randomized to help level the playing field. And yes
this works but it causing frustration to users as when you bookmark the
results, or refresh it for various reasons the order is always new.

Our idea is to nightly order the members at random and when showing results.
I call this shuffling only to make the metaphor. I really mean setting
randomized values in a extra column which will be sorted when the user asks
for "random" results.

Thanks for you help.

~ Mike
-----
Mike Zornek
Web Designer, Media Developer, Programmer and Geek
Personal site: <http://MikeZornek.com>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to