I have a table of invoices and clients.
In the invoice table, for example, I have the fields client_id, status, and date
In the customer table id, name, etc ...
What I need is to list all invoices, that the status is still Open (in case NP - of unpaid). But I just want to list invoices that have not been paid for more than 10 days.
Listing example
Cliente Data de Vencimento Valor
Teste 10/08/2016 R$ 100,00
Teste 09/08/2016 R$ 200,00
Teste 05/08/2016 R$ 100,00
Teste 01/08/2016 R$ 100,00
Teste 10/07/2016 R$ 100,00
I use PHP and MySQL.