tags:

views:

32

answers:

2

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

SELECT 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

+5  A: 
SELECT CURDATE();
mopoke
Sometimes it really is that simple. :-)
ceejayoz
+1  A: 

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.

OMG Ponies