RE: [PHP] Shuffling a mySQL Result Set

From: Date: Sun, 30 Jul 2000 13:08:55 +0000
Subject: RE: [PHP] Shuffling a mySQL Result Set
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9089@lists.php.net to get a copy of this message
yes, but no. $result = mysql_query ("SELECT id FROM table WHERE id in (1,2,3,4)"); $myarray = mysql_fetch_array($result); shuffle($myarray); I think.... personally I've never used shuffle() but I'm assuming it "shuffles" an array, correct? In either case, you wouldn't execute it on the $result from a query, but the data associated with the result. John -----Original Message----- From: Andrew [mailto:fisherres@msn.com] Sent: Sunday, July 30, 2000 8:42 PM To: PHP General Subject: [PHP] Shuffling a mySQL Result Set Hello, Say I run the following mysql query: $result = mysql_query ("SELECT id FROM table WHERE id in (1,2,3,4)"); Is it possible to run the shuffle() function on $result e.g. shuffle ($result); Would this shuffle the result set e.g. randomize? Thanks! Andrew digi-FX ------------------------------- http://www.digi-FX.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#9089) next »