Re: are there any random commands in php
| From: | Intruder | Date: | Tue, 20 May 2003 20:33:52 +0000 |
| Subject: | Re: are there any random commands in php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148321@lists.php.net to get a copy of this message | ||
If you want new "joke" for every user (or every page REFRESH) you can just
make "SELECT * FROM table ORDER BY RAND()".
If you have fixed "joke" for each day, then just enumerate them somehow or
implement some HASH function, which produces different values for different date
in calendar.
ct> I try to choose one entry in the database, almost like "a joke of the day"
ct> that should be done automaticly so every day has a different entry. any
ct> ideas