I have a table in database for meeting schedules. It has 2 columns named start
and end
and since I dont have access to the php script which fills this table with new data, I am not sure in which format it is.
But PHPMyAdmin shows taht the columns for start and end are varchar(15)
So I guess it should be datetime compatible.
Example in DB: 1378033200 Which shows as 01 September 2013
My question is, I want to pull the meetings and show them in a html page, but I do not want meetings which are older than 2 days ago (server time) to show up. What will be the query?
SELECT * FROM schedules ORDER BY start
Something like
SELECT * FROM schedules ORDER BY start WHERE start > 2 days ago
I tried this but it seems it does nothing!
SELECT *
FROM schedules
WHERE COALESCE(start, 0) < CURDATE() - INTERVAL 2 DAY
ORDER BY start