#10590 [Com]: Retrieving Random Rows

From: Date: Tue, 20 Jul 2004 15:01:58 +0000
Subject: #10590 [Com]: Retrieving Random Rows
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-62828@lists.php.net to get a copy of this message
ID: 10590 Comment by: the-our754 at hotmail dot com Reported By: marty at webmayhem dot net dot SPAMmeNOT Status: Bogus Bug Type: MySQL related Operating System: Linux PHP Version: 4.0.5 New Comment: <a href=http://r-real-swingersoral.da.ru>our the</a> Previous Comments: ------------------------------------------------------------------------ [2001-05-01 17:37:20] derick@php.net Not a PHP bug (but thx for the suggestion) Jani and Derick ------------------------------------------------------------------------ [2001-05-01 17:25:29] marty at webmayhem dot net dot SPAMmeNOT in response to some of the user contributed notes on the 'rand()' function page, a good way to pull a randmon row from a MySql database ( < ver 3.23 ) is: SELECT field, field*rand() AS ran FROM table ORDER BY ran LIMIT 1 hope it helps. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=10590&edit=1

« previous php.bugs (#62828) next »