Sorry I just realised it was one query  I managed to get the query to work and it retrieves some data but it doesn't retrieve the difference in days:
PHP Code:
SELECT * FROM action WHERE (TO_DAYS( NOW( ) ) - TO_DAYS( dueDate )>1)
I want to get the difference in days between the dueDate stored in the action table and NOW() what does the > 1 do?
I then tried using this query which also worked but when I specify the table to get the date from there was an error so I probably put the SELECT * FROM table in the wrong place?
PHP Code:
SELECT * FROM action (FROM_DAYS(TO_DAYS(NOW())-TO_DAYS('dueDate')), '%d')AS DayDiff;
Also, I want it to display the difference in days even if it isn't accurate because it will only be used for a rough estimate.
Thanks,
Last edited by drew22299; 07-07-2008 at 06:12 AM..
|