[thelist] Displaying info according to date

Andre Genic g3nic at lycos.co.uk
Thu Jun 26 01:34:05 CDT 2003


Hi boys and girls, I've been trying to work on something, basically cos I
don't know how to do it, so I thought a few days of messing around might
lead to something productive, alas it didn't.

What I'm trying to do, is add information to a table and then retrieve
everything up to a date point, I've tried a few things like using $now =
$date and using a formatted date in the sql query, but no luck, I'm storing
dates like this $date = date("M jS Y"); you probably get the idea.

$date = date("M jS Y");

$now = $date

$sql = "SELECT * FROM table WHERE $ddate = -->$now"; just a basic idea...

Putting the information in is no problem, it's just the retrieval, what I'm
trying to achieve is being able to add stuff to a site a few days in advance
or a week in advance, then when the right day comes along, everything in the
table gets displayed up to todays date etc, apart from the stuff that hasn't
reached it's due date.

Hope you can understand what I mean, cos I'm starting to lose the plot with
this one.

Andre.



More information about the thelist mailing list