Answer the question
In order to leave comments, you need to log in
How to get the number of orders for today?
The bottom line is, I want to display the total number of orders for today (not for 24 hours) in the admin panel.
I try like this:
$day_orders = $db->query("SELECT COUNT(*) FROM 'oc_order' WHERE 'date_add' >= CURDATE() ");
$day_orders_count = count($day_orders);
echo $day_orders;
Answer the question
In order to leave comments, you need to log in
$day_orders = $db->query("SELECT COUNT(*) as cnt FROM 'oc_order' WHERE 'date_add' >= CURDATE() ");
echo $day_orders['cnt'];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question