开发者

How can I work out what curdate() in MySQL is returning?

开发者 https://www.devze.com 2022-12-17 20:37 出处:网络
I\'d like to know when I write a query like S开发者_Python百科ELECT id FROM users WHERE expiry > curdate()

I'd like to know when I write a query like

S开发者_Python百科ELECT id FROM users WHERE expiry > curdate()

How can I work out what the curdate() is returning? I just switched servers of a site and it appears to be throwing it out, by perhaps returning a different curdate().

Thanks


SELECT CURDATE();


From the documentation, CURDATE():

Returns the current date as a value in 'YYYY-MM-DD' or YYYYMMDD format, depending on whether the function is used in a string or numeric context.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号