What is the largest date PHP and MySQL recognizes?
I mean, I have different values for different timeline and I want to make them all as BETWEEN selects in MySQL, like this:
SELECT * FROM table WHERE date BETWEEN '2011-10-01' AND '2011-10-02';
SELECT * FROM table WHERE date BETWEEN '2011-10-03' AND '2011-10-10';
etc.
To get all options, was thinking of something like this:
SELECT * FROM table WHERE date BETWEEN '0000-01-01' AND '2011-10-01';
SELECT * FROM table WHERE date BETWEEN '2011-10-02' AND '2011-10-10';
SELECT * FROM table WHERE date BETWEEN '2011-10-11' AND '9999-12-31';
Will this always work or is there a chance the code might break at some point?
taken from http://dev.mysql.com/doc/refman/5.5/en/datetime.html