Good morning, I've been learning php programming on my own, I've set myself the task of creating a kardex of input and output products, because I know a lot about that in the company where I work.
The kardex that they speak in my company pretends to show the following
id_producto|nombreProducto|saldoInicial|fechaMovimiento|cantidad_entrada|cantidad_salida|saldo final
that result would be obtained in certain ranges of dates ... I would like help to understand where I can take or calculate the initial balance, because this would logically vary according to the selected date range, (mention that right now I have only created the Products table , buying, selling) because for my little experience I do not know, but I want to learn ... if you are so kind to help me ... I'll thank you
I speak php and mysql language