Re: [PHP] Joke of the day problem

2007-03-12 Thread Richard Lynch
create table alljokes (joke_id int unsigned auto_increment unique not null primary key, joke text); create table daily (whatdate date unique not null primrary key, joke_id int); Run a daily cron job that does this: Your web page then just does: Joke of the day$joke\n"; ?> YMMV On Thu, March 8,

Re: [PHP] Joke of the day problem

2007-03-10 Thread tedd
At 2:30 PM +0100 3/8/07, Delta Storm wrote: Hi, again me with the silly questions... I need a script that will take data from MySQL database and display one row each day. I have googled, but with no luck. The database retrieving mechanism is of course clear but I really dont know how to do

Re: [PHP] Joke of the day problem

2007-03-08 Thread Paul Novitski
At 3/8/2007 05:30 AM, Delta Storm wrote: I need a script that will take data from MySQL database and display one row each day. ... The database retrieving mechanism is of course clear but I really dont know how to do a 24h delay before the next row is displayed. Hi Delta, You haven't stated

Re: [PHP] Joke of the day problem

2007-03-08 Thread jekillen
On Mar 8, 2007, at 5:30 AM, Delta Storm wrote: Hi, again me with the silly questions... I need a script that will take data from MySQL database and display one row each day. I have googled, but with no luck. The database retrieving mechanism is of course clear but I really dont know how

RE: [PHP] Joke of the day problem

2007-03-08 Thread Jim Moseby
> > Hi, > > again me with the silly questions... > > I need a script that will take data from MySQL database and > display one > row each day. > > I have googled, but with no luck. > > The database retrieving mechanism is of course clear but I > really dont > know how to do a 24h delay bef

Re: [PHP] Joke of the day problem

2007-03-08 Thread clive
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

[PHP] Joke of the day problem

2007-03-08 Thread Delta Storm
Hi, again me with the silly questions... I need a script that will take data from MySQL database and display one row each day. I have googled, but with no luck. The database retrieving mechanism is of course clear but I really dont know how to do a 24h delay before the next row is displayed