I'd be very grateful for any advice/assistance with the following problem:
Using a database of events with each event indexed using a date format eg. 20091031, I want to pull all events previous to today's date into one page (past diary) and all events from today's date into a second page (future diary). In this way an online diary will automatically update itself on the webpage once an event has passed.
Is this possible ... and how?
I'm using the following to select from the database:
Code: Select all
$sql = "SELECT * FROM diary ORDER BY dateindex DESC";'WHERE dateindex =< TODAY'
(dateindex is the DB field where all entries are formatted - 20091031)
Many thanks in advance for any bright ideas.