Re: [PHP-DB] MySql and displaying only yesterday's records

2002-10-21 Thread Jason Wong
On Monday 21 October 2002 22:07, lallous wrote: > TO_DAYS() applied on datetime field is returning different values on > different times but same date! > > How can I pass to TO_DAYS() only the DATE part of my datetime field? As far as I can tell, TO_DAYS() does only use the DATE part regardless wh

RE: [PHP-DB] MySql and displaying only yesterday's records

2002-10-21 Thread John W. Holmes
> Given a datetime field in a MySql database, how can i list all the records > that are dated back to yesterday or to 'N' days in the past? SELECT * FROM your_table WHERE TO_DAYS(date_column) = TO_DAYS(CURRENT_DATE) - N Where N is how many days you want to go back. ---John Holmes... -- PHP D

[PHP-DB] MySql and displaying only yesterday's records

2002-10-21 Thread lallous
Hello, Given a datetime field in a MySql database, how can i list all the records that are dated back to yesterday or to 'N' days in the past? Thanks, Elias -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php