I have this query for this week:
Code: Select all
<?php
SELECT sum(orders_total) as total, count(orders_id) as ordnum FROM orders WHERE TO_DAYS(NOW()) - TO_DAYS(orders_date) <= 7
?>I'm not sure after read the docs how to subtract time and compare the dates. Anyone? thanks