0
Hello!
I have two tables: one where I register entries and another where I have a register of payment methods. When I enter a value into the input table, I put the Pgto form ID and that ID corresponds to my payment method table ID.
My SELECT code is this:
SELECT SUM(r_entradas.entrada_valor) AS Valor,c_forma_pgto.forma_nome AS Forma FROM r_entradas
INNER JOIN c_forma_pgto ON r_entradas.forma_id = c_forma_pgto.forma_id
WHERE log_data = CURDATE()
ORDER BY r_entradas.forma_id ASC
I am trying to filter this sum so that it shows differently the respective sum of each ID. For example:
80 | Money
50 | Credit
Only in my current code, it ends up assigning some form and showing the total. Ex:
130 | Credit
It worked perfectly, thank you very much!
– fredsonnunesjr