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: ?php require '/full/path/to/db/connect.inc'; $query = 'select joke_id from

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

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

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 before the next

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 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