Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

curdate() minus int query

Status
Not open for further replies.

hotliquer

Programmer
Oct 5, 2005
7
GB
Hi,
I have a problem when using this query:
select * from arcade_takings where date = curdate() – 2;

If i change the int at the end to "1" it works fine. like this:
select * from arcade_takings where date = curdate() – 1;
Anything over "2" it returns nothing at all even though data exists for 31st March

It seems to have a problem going backwards from April to March

Any ideas guys would be of great help to me!

Thanks

Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top