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.
精彩评论