note 60145 deleted from function.rand by tularis

From: Date: Wed, 28 Dec 2005 00:23:42 +0000
Subject: note 60145 deleted from function.rand by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-100825@lists.php.net to get a copy of this message
Note Submitter: Reason: useless ---- I need to have the same "random" records for one week. $strSql="select min(id) as min, max(id)as max from table"; $row = mysql_fetch_array(send_sql($strSql),MYSQL_BOTH); $min=$row["min"]; $max=$row["max"]; srand(date("W")); // < This sets a new starting point every week for ($i=1;$i<10;$i++){ $where.=" id = ".rand($min,$max)." or ";} ....

« previous php.notes (#100825) next »