note 102045 deleted from function.rand by danbrown

From: Date: Tue, 25 Jan 2011 05:08:44 +0000
Subject: note 102045 deleted from function.rand by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-176272@lists.php.net to get a copy of this message
Note Submitter: bialko0019 ---- @Jesse, if you want pick a random record from database, you do not have a random number and then find it, you can use the RAND(): <?php $zapytanie = mysql_query("SELECT * FROM table ORDER BY RAND() LIMIT X"; ?> Białko

« previous php.notes (#176272) next »