Date problem again ;-)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there everyone,

 

OK I'm using the following in my query to display entries in the LAST 3
days:

 

DATE_SUB(CURDATE(),INTERVAL 3 DAY) <= ListingDate

 

But it doesn't seem to affect the results, the date format in my DB column
(ListingDate - datatype is Date) is 2000-00-00 as in year, month and date -
is THAT the problem?  That it needs to be an actual timestamp?  If that is
the case I'm not sure how to approach this because the data MUST be in the
above format as it comes from a central DB every night.  All I need to do is
display the current date plus also the previous x amount of days in between.

 

I'm using PHP 4 with MySQL 4.0.22 (Not the latest MySQL I know, sigh).

 

Chris


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux