Re: [PHP-DB] Dates in MYSQL

2002-04-17 Thread DL Neil
"%D %M %Y") as > > evdt FROM notices WHERE eventdate >= $todaysdate ORDER BY > > eventdate"; > > > > > > > > > > Mike > > - Original Message - > > From: "Alex Francis" <[EMAIL PROTECTED]&

Re: [PHP-DB] Dates in MYSQL

2002-04-17 Thread Alex Francis
> $query = "SELECT id, eventheading, DATE_FORMAT(eventdate, "%D %M %Y") as > evdt FROM notices WHERE eventdate >= $todaysdate ORDER BY > eventdate"; > > > > > Mike > ----- Original Message - > From: "Alex Francis" <[EMAIL PROTECTE

Re: [PHP-DB] Dates in MYSQL

2002-04-17 Thread Mike
Mike - Original Message - From: "Alex Francis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 17, 2002 5:26 PM Subject: Re: [PHP-DB] Dates in MYSQL > Tried the following as suggested - Still no dates showing > > $query = ' SELECT id, even

Re: [PHP-DB] Dates in MYSQL

2002-04-17 Thread Alex Francis
Tried the following as suggested - Still no dates showing $query = ' SELECT id, eventheading, DATE_FORMAT("eventdate", "%D %M %Y")as "evdt" FROM notices WHERE TO_DAYS(eventdate) >= TO_DAYS(now()) order by eventdate'; $result=mysql_db_query($dbname, $query, $link); if (!$result) { echo( mysql_e

Re: [PHP-DB] Dates in MYSQL

2002-04-17 Thread DL Neil
Hi Alex, > Got my select statement to work as follows: > $query = ' SELECT * FROM notices WHERE TO_DAYS(eventdate) >= TO_DAYS(now()) > order by eventdate'; =well done! However the TO-DAYS calls do seem a bit OTT. Please post the schema for tbl:notices - specifically the datatype for eventdate.

RE: [PHP-DB] dates in MYSQL

2002-04-17 Thread Ruprecht Helms
Hi Alex Francis, > SELECT From the database WHERE date >= todays date. ^ somethink like now() or date() an other method you put the date in a variable that you get by the datecommand and make SELECT From WHERE date >= datevar (variable with current da