database modeling in php doubt

0

I'm going to make a system for a colleague so I'm in doubt as to how I model the database

I have a table with tbl_leituraText tbl_leituraPrevious tbl_consumo tbl_fatorCorrecao = tbl_total

How do I do this total get the result of this calculation and insert into the database ??? I'll do it in php

There is a picture of the system that I'm going to do in excel, which model I could use to make this system. When I enter the value, I want it to fill in the total value field and then have a submit button and save the data in the database.

    
asked by anonymous 26.04.2017 / 01:21

1 answer

0

You could have only one table "readings". Where would store the date, read, consumption, etc. Mounting the table with PHP makes it easier to query.

    
26.04.2017 / 03:42