firman
07-10-2007, 02:42 PM
I am trying to select data out of my MYSQL db that is more than 180 days old from today's date.
$query = "SELECT *,DATEDIFF($todays_date, LAST_MAINT_DATE) < 180 FROM inventory_maint ORDER BY $row_name ASC";
I have tried the above...with no success... LAST_MAINT_DATE and todays date is formated as YYYY-MM-DD. How can I have all data display when the LAST_MAINT_DATE is over 180 days old?
I am trying to use this in a PHP program.
$query = "SELECT *,DATEDIFF($todays_date, LAST_MAINT_DATE) < 180 FROM inventory_maint ORDER BY $row_name ASC";
I have tried the above...with no success... LAST_MAINT_DATE and todays date is formated as YYYY-MM-DD. How can I have all data display when the LAST_MAINT_DATE is over 180 days old?
I am trying to use this in a PHP program.