Re: PHP GUI?
| From: | Mike Flynn | Date: | Wed, 07 Nov 2001 14:21:33 +0000 |
| Subject: | Re: PHP GUI? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-10258@lists.php.net to get a copy of this message | ||
A better idea is to use the built-in MySQL Rand() function..
For example...
$query = 'SELECT intImageID, strImageFilename, strImageDescription ';
$query .= 'FROM tblImages ';
$query .= "WHERE intImageType = $pictype ";
$query .= 'ORDER BY rand()';
At 10:32 AM 11/7/2001 +0000, you wrote:
On Tue, 6 Nov 2001 20:41:59 -0600, todd@williamsen.net (Todd Williamsen) wrote: I am interested in how I would write a query to mysql that would randomize a selection... You should put the resulting rows in an array (that's default already) and than have a look at the array 'shuffle' function. Good luck,
-=- Mike Flynn - Burlington, VT -=-mike@mikeflynn.net http://www.mikeflynn.net/ * Give blood * ...maintaining lawns, watching televised sports, birthing children, listening to Top 40 music, and collecting stuffed animals...