2
I have the following table in my bank:
"financeiro
financeiro_id INT AUTO_INCREMENT,
financeiro_pagamento DATE,
financeiro_pid INT,
financeiro_valor INT,
";
In this table I record the payments that my system receives, then use the following Query to return me the values:
"SELECT *FROM login lo
inner join financeiro fi on lo.login_id = fi.financeiro_pid
Order by financeiro_pagamento";
This Query takes the financeiro_pid
and joins with the table login
to know who paid, only that I need each equal record of this table return only the person’s last payment. With this Query I’m taking all payments, but I just wanted the last payment from the user.
Obs.: financeiro_pid
is where I register the user key.
Top solved thanks for saving
– Tulio Vieira