469,342 Members | 6,320 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,342 developers. It's quick & easy.

screen with error in displaying the data, sql code does not work

this page has an error when pressing the money button to consult, I have sql code but it is not working properly



sql code used:

SELECT
e.nomeEvento,p.nomecompl,c.nomecasa, COALESCE(l.observacao,'Sem informação') AS `observacao`, CONCAT('R$ ',REPLACE(REPLACE(REPLACE(FORMAT(IFNULL(l.valorExt ornado, 0), 2), ".", "@"), ",", "."), "@", ",")) AS `valorExtornado`,
l.idpart, l.parcela, p.id AS idParticipante, DATE_FORMAT(l.datavcto, '%d/%m/%Y') AS `dataVcto`,
CONCAT('R$ ',REPLACE(REPLACE(REPLACE(FORMAT(l.valor, 2), ".", "@"), ",", "."), "@", ",")) AS `valorDevido`,
IF(l.datapgto IS NULL,'danger','success') AS `pagoCSS`,
IF(l.datapgto IS NULL,'Pendente','Pago') AS `pago`,
IFNULL(DATE_FORMAT(l.datapgto,'%d/%m/%Y'),'') AS `dataPgto`, CONCAT('R$ ',REPLACE(REPLACE(REPLACE(FORMAT(IFNULL(l.valorpag o, 0), 2), ".", "@"), ",", "."), "@", ",")) AS `valorPago`,
(SELECT COUNT(1) FROM UF_financeiro_lctofinan WHERE id_eventos_participante=p.id AND fl_excluido='N') AS NUM_PARCELAS
FROM UF_financeiro_lctofinan AS l
LEFT JOIN UF_eventos_participantes AS p ON l.id_eventos_participante=p.id
LEFT JOIN UF_eventos AS e ON e.id_evento=p.id_evento
LEFT JOIN UF_casas AS c ON p.idcasainscr = c.idcasa
LIMIT 150 -- retirar esse LIMIT depois, isso é apenas para debugar
Aug 21 '20 #1
1 2637
dev7060
507 Expert 256MB
What is it in English?
Aug 22 '20 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by vinayak | last post: by
11 posts views Thread by dba | last post: by
4 posts views Thread by =?Utf-8?B?UGF1bA==?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by haryvincent176 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.