Dashboard with this information

0

I want to create a simple dashboard. exactly like that!

inthe(ORDERS)fieldwouldbetheordercountforthecurrentdayorbydate.inthefield(REVENUE)wouldbethevalueofsalesonthecurrentdayorbydate.inthefield(AVERAGETICKET)wouldbeanaverageofthevaluesoftherequests.

Herebelowarethefieldsofmymysql.clearofacertainTable.

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

In spite of my little knowledge in php. I even made one but it was not cool! Who can help me in this matter ... I'm grateful!

    
asked by anonymous 26.02.2018 / 19:03

1 answer

0

Daniel You can search this table using php

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 Average 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 have helped

    
30.08.2018 / 18:09