Re: Joke of the day problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Delta Storm wrote:
Hi,

again me with the silly questions...



you could have another table in your database that logs the id of the current joke and the date it was shown on, then simply 'select jokeid,dateshown from jokelog order by dateshown limit 1' will get you the last joke and when it was used, if the date is yesterdays date then get a new joke from the joke table.

you could also have do the same but store 1 entry in a file, file io is sometimes quicker than a query on a large db.

--
Regards,

Clive.

Real Time Travel Connections


{No electrons were harmed in the creation, transmission or reading of this email. However, many were excited and some may well have enjoyed the experience.}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux