Dashboard with this information

Asked

Viewed 83 times

0

I am wanting to create a simple Dashboard. exactly like this! inserir a descrição da imagem aqui

in the field (ORDERS) would be the order count of the current day or by date. in the field (REVENUE) would be the value of sales on the current day or by date. in the field (TICKET AVERAGE) would be an average of the order values.

here below is the fields of my mysql. clear from a certain table.

inserir a descrição da imagem aqui

the field (ped_id) is sequential. the field (ped_value) is the purchase value.

despite my little knowledge in php. I even made one, but it wasn’t cool! who can help me in this matter... I am grateful!

  • Help you with what? With PHP, with mysql, with CSS layout? It’s not clear what you really need... What do you already have of code? Edit your answer with code etc... And take the Tour to better understand how the https://answall.com/tourplatform works

1 answer

0

Daniel You can search this table using php

The requests:

SELECT COUNT(*) FROM pedidos WHERE ped_Datahora BETWEEN
'".date("Y-m-)."01 00:00:00' AND '".date(""Y-m-t)."23:59:59'

The values:

SELECT SUM(ped_valor) FROM pedidos WHERE ped_Datahora BETWEEN '".date("Y-m-)."01 00:00:00' AND '".date(""Y-m-t)."23:59:59'

The Middle Ticket:

SELECT AVG(ped_valor) FROM pedidos WHERE ped_Datahora BETWEEN '".date("Y-m-)."01 00:00:00' AND '".date(""Y-m-t)."23:59:59'.

I hope I’ve helped

Browser other questions tagged

You are not signed in. Login or sign up in order to post.