Right now I have a MySQL table with one column called "date_time" that simply lists different DATETIME values (e.g. "2010-11-30 12:55:00"). Is it possible for me to construct a query that directly:
- Selects DATETIME values where the month is the current month?
- Selects DATETIME values where the days aren't passed days (e.g. tomorrow and until the end of the month?
An abstract query in my mind would look like:
$query = "SELECT * FROM meetings WHERE uid = " . $_SESSION['uid'] . "AND the DATETIME month is active month AND the DATETIME day is bigger than the active day"
Is this functionality possible in MySQL (did some searching but didn't find anything helpful), or will I have to use PHP functions later to filter this stuff out? Many thanks in advance.
WHERE date_time<NOW()?