First add a field to the db which is a 'date' type.
On entering data, combine the fields to one and call strtotime()
$realDate = strtotime($year.'-'.$month.'-'.$day);
or actually
$strDate = date('Y-m-d' , strtotime($year.'-'.$month.'-'.$day));
after this dates are comparable with each other.
To select the furure dates,
$now = $date('Y-m-d');
then simply:
$sql = "select fields from table where date-type-field>'$now' ";
If you want to transfer old data to the new system, simply get the data out, combine it and put it back. When you finished you can delete the old fields.
I'm not sure but maybe a direct string combination of the three would work for this purpose...I'll check it.
Edit: is this the kind of info you were after?
Edit2:
Ok it works. While there I tested if concatenating the date parts would work ...and it does too 😉
so you can use this short method (I had the date parts in smallint fields):
SELECT fields FROM table WHERE concat(year,'-',month,'-',day)>now()
but I still recommend chaning to date, it's not a biggie and much better.
If you need parts you can still select them using year() for example - just check the mysql manual, look for 'date and time functions'
this would be the conversion method:
update table set realdatefield= concat(year,'-',month,'-',day);