PHP mysql定义了销售点

need ur help I build a inventory and management stock + invoice I have a table "invoice"

content: id 
customer_name
net_total
paid
due
ordre_date

I wanna show all net_total for everyday, for week and for months

I use this query

SELECT *, sum(net_total) as privé 
FROM invoice 
GROUP BY order_date 

but it's don't show all net_total for each day

Try:

SELECT DATE_FORMAT(order_date, '%Y%m%d') AS order_day, sum(net_total) AS privé FROM invoice GROUP BY order_day ORDER by order_day

As order_date might be a timestamp with hour, minutes... and you want to group by just the day.