Re: [PHP-DB] Dates in MYSQL

2002-04-18 Thread DL Neil
ventdate = $todaysdate ORDER BY eventdate; 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

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 table WHERE date = datevar (variable with current

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

Re: [PHP-DB] Dates in MYSQL

2002-04-17 Thread Mike
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, eventheading, DATE_FORMAT(eventdate, %D %M %Y)as evdt FROM notices WHERE TO_DAYS(eventdate) = TO_DAYS(now

Re: [PHP-DB] Dates in MYSQL

2002-04-17 Thread Alex Francis
te ORDER BY eventdate; 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, eventheading, DAT