In my app I'm trying to query a table that is set up as follows.
m tinyint(2) // month
d tinyint(2) // date
y smallint(4) // year
The date is split up into 3 fields. m, d, and y
I want to query the table by using something like the following:
$str_today = date('Y-m-d', strtotime('now'));
$date = getDate($str_today); // dont know how to get date. Is this right?
$month = getMonth($str_today);
$year = getYear($str_today);
// get the rows that happen today or later
SELECT * FROM table WHERE ($date >= d and $month >= m and $year >= y) order by d, m, y" );
Hope this makes sense.
Can anyone advise?
J