I need to develop a calendar which tells you if a given day is of type A, B, C or D. So basically, users requests info for a given day, and the website tells them if that day is of type A, B, C or D. So I will create a PHP function that checks for the given day in the database, and returns its type.
Is it possible (and if it is, is it a good practice) to programatically create the mysql table with a row for each day of the year, with a DATE type to identify each day? How can I do this?
EDIT: In the end, I used @nic's idea but instead I coded it in PHP, and created a reusable function with it. The function expects a string parameter, containing the year in YYYY format, and creates a table with a row for each day of the year cointaining a DATE field, and several text fields for day, month, year and weekday.
You can find it here