PHP and MySQL smallest and largest possible date

后端 未结 6 540
挽巷
挽巷 2021-01-18 06:42

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

6条回答
  •  孤街浪徒
    2021-01-18 07:01

    Dates are nothing more than integers. Integer size are system dependent; i.e. 32 bit, 64 bit, etc.

    In php integer size can be determined using the constant PHP_INT_SIZE, and maximum value using the constant PHP_INT_MAX

    In mysql you can do something lke this: SELECT ~0 as max_bigint_unsigned

提交回复
热议问题