Question about Date function in PHP and MySQL
Posted: Mon Apr 06, 2009 4:29 pm
I have a big question.
At work, the purchasing manager requires a daily report actioned each day.
The time of the report will be actioned at 3pm.
It requires all orders back dated to the previous day after 3pm, would this be possible?
What kind of function would I have to write if it was basically just 2 columns of the date in MySQL and the Product code?
Orders table (after join):
The overall aim of the above is to combine the 2 items LC01BK in one row in excel later on, so that we know what to order in a concise manner when ordering products from our suppliers.
Could this be done using a dynamic date that looks back to the previous date and time?
Obviously taking the date value of todays date and then looking back to the previous date after 3pm?
Thanks,
Jeremy.
At work, the purchasing manager requires a daily report actioned each day.
The time of the report will be actioned at 3pm.
It requires all orders back dated to the previous day after 3pm, would this be possible?
What kind of function would I have to write if it was basically just 2 columns of the date in MySQL and the Product code?
Orders table (after join):
Code: Select all
Order ID SKU Product name QTY_ordered (of item only)
1 BRLC01BK LC01BK 20
1 BRLC02BK LC02BK 10
2 BRLC01BK LC01BK 10
Could this be done using a dynamic date that looks back to the previous date and time?
Obviously taking the date value of todays date and then looking back to the previous date after 3pm?
Thanks,
Jeremy.