Hi Everyone,
I need to get the orders out of my database for statistics purposes.
For example I need to be able to pull out the orders for the following at any given time:
Last Weeks orders (A week is monday 00:00 to sunday 00:00)
This weeks' orders to date. (So monday 00:00 to date)
Last Months orders (Entire Month Just Gone)
This Month's orders to date
Last Financial Year's Orders (April 5th (Last Year) 00:00 to April 4th this year 23:59)
This financial year to date (April 5th this year 00:00 to date.)
Column is in DATETIME (01-07-2005 22:59:00) mysql datetime format
So what mysql query would I use and how would I create a drop down list with the corect variables in it for each of the above options?