I am writing a code that shows the data of a table stored in a BD using a While cycle. The table shows 4 data that are ID
, id_cliente
, Mes de pago
, monto
.
On a client the While shows me 3 records
ID id_cliente Mes de pago monto
1 25 06 15000
2 25 07 20000
3 25 10 10000
I would like to know if there is any way to compare the months of payment of the different rows, that is, the difference of months between rows 1 and 2, between 2 and 3 and thus the more records there are.
to make known the months in which that customer did not pay, in this case would be the 08 and 09.
I thank those who can help. Greetings.