PHP 和 MySQL 识别的最大日期是多少?
我的意思是,我对不同的时间线有不同的值,我想将它们全部作为BETWEEN
MySQL 中的选择,如下所示:
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';
等等
为了获得所有选项,正在考虑这样的事情:
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';
这会一直有效吗?或者代码是否有可能在某个时候中断?