php-db | 2002122
Date: 12/16/02
- Next message: David: "Re: [PHP-DB] Get error message, need help"
- Previous message: Peter Beckman: "Re: [PHP-DB] How to return records in _random_ order ???"
- In reply to: Miles Thompson: "Re: [PHP-DB] How to return records in _random_ order ???"
- Next in thread: John W. Holmes: "RE: [PHP-DB] How to return records in _random_ order ???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks Miles.
Long story about why they need to be random.
I'll give all the suggestions here a good review.
Thanks everybody for the help.
tmb
"Miles Thompson" <milesthompson <email protected>> wrote in message
news:5.2.0.9.0.20021217004151.015d23a8 <email protected>
> I dunno - why does this topic pop up periodically. Anyway, here are two
> suggestions:
>
> 1. Add a field to the table, called rand_order. Whenever you update the
> table insert a random number in it and when fetching records order by
> Rand_order.
>
> 2. Generate an array of 20 random numbers and use it to index the returned
> records.
>
> Neither of these are though out -- sort of 1:00 in the morning
inspiration?
> Why do you want them in random order?
>
> Cheers - Miles
>
> At 11:10 PM 12/16/2002 -0500, tmb wrote:
> >I need to...
> >
> >1 - Select a set of records from a db
> >
> >2 - Return a list of one or two fields from the selected record set in
> >random order on a web page.
> >
> >Once I have my selected records & fields... say I end up with 20 records
> >after my select query...
> >
> >How can I return the selected records in _random_ order ??
> >
> >Hopefully I have made the question clear...
> >
> >thanks for any help.
> >
> >tmb
> >
> >
> >
> >
> >--
> >PHP Database Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: David: "Re: [PHP-DB] Get error message, need help"
- Previous message: Peter Beckman: "Re: [PHP-DB] How to return records in _random_ order ???"
- In reply to: Miles Thompson: "Re: [PHP-DB] How to return records in _random_ order ???"
- Next in thread: John W. Holmes: "RE: [PHP-DB] How to return records in _random_ order ???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

