i hate being a newb ...
i'm trying to display data from the db, but only if the date in the field 'end_date' is equal to or greater than today's date. i'm not concerned with server vs local time since i'm only dealing with US timeframes.
this is what i've tried:
$result=mysql_query("SELECT title
, location
, sponsor
, description
, begin_date
, end_date
, contact_name
, contact_phone
, link
FROM {$table} WHERE end_date
>= \'2008-12-16\' ORDER BY begin_date
ASC" );
if (!$result) {
die("Query to show fields from table failed");
}
this worked yesterday, but not today - dunno why. today i get the mssage "query to show fields from table failed". but even if it worked today, i'd have to change the code everyday to match today's date.
i've tried defining $currentdate and using that as a variable in the WHERE clause but can't get it to work either.
so how does one go about doing this?
thanks for any/all help.