PyraX Posted July 21, 2007 Share Posted July 21, 2007 Hi, Im trying to make an order reporting page that gets all the orders from any month and any year. It will look something like this: $sql = "SELECT * FROM orders WHERE ..." Thanks in advance Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 21, 2007 Share Posted July 21, 2007 if your date is in a unix time stamp use the mktime functions to get you a string formatted the right way and then say WHERE Date > $start && Date < $end where $start = beginning of the year in unix seconds (or month) and $end = end of year in unix seconds Quote Link to comment Share on other sites More sharing options...
PyraX Posted July 21, 2007 Author Share Posted July 21, 2007 I need to have the url so that its like admin.php?do=order_view&month=06&year=2007 Thanks cooldude Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 21, 2007 Share Posted July 21, 2007 thats fine, do you understand the date() functions in php if not look em up on php.net or w3schools.org has a very nice reference table of the flags for date returns all you have to do is say mktime() using $_GET['month'] as the month and $_GET['year'] as the year Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.