Hello Gray,
could you possibly use some case clauses? Lets say you use 7 case clauses for the week. And each day has a random number. So you do a random on Monday and then you sort it out int the "monday" case statement and so on.
Just an idea,
Merlin
I.A. Gray wrote:
Hi,
My brain is working very slowly this morning (maybe that is because of having 5hrs sleep...) Could someone help me with this problem.
I would like to show a different CD with information on it, on the home page each week- a kind of 'recording of the week' and I would also like to have on the same page something that changes every day.
The recordings are in a MYSQL database and I would like all of them (there are 29 at present) to be shown over how ever long it would take to get through them (in this case 29 weeks) and then once they have all been shown this would then repeat. I would like them to be shown in a random order and make sure that the recording hasn't been shown within the 29. The same goes for the other project which uses a mysql database which I would like to rotate daily (in this case there are 103 items)
Obviously if I use PHP random functions this will always return a random number, but how do I produce a random number which relates to the day or week of the year?
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php