0
Today I can already do the consultation 10 days ago as shown in the query below, I’m just not able to deploy the 10 days ahead of the current date.
SELECT
`vw_saldobancario`.`contaApelido`,
`vw_saldobancario`.`tipoMovimento`,
`vw_saldobancario`.`historico`,
(
vw_saldobancario.debitosPendentes + vw_saldobancario.debitos
) AS debitos,
(
vw_saldobancario.creditosPendentes + vw_saldobancario.creditos
) AS creditos,
`vw_saldobancario`.`dataMovimento`,
`vw_saldobancario`.`conta_bancaria_id`,
IF (
creditosPendentes > 0
OR debitosPendentes > 0,
'SIM',
'NAO'
) AS Pendentes
FROM
`vw_saldobancario`
WHERE `dataMovimento` BETWEEN DATE_ADD(CURRENT_DATE(), INTERVAL -10 DAY) AND CURRENT_DATE()
AND `conta_bancaria_id` = 3
GROUP BY `idHistorico`
Yes, but this is not the question friend and how I do to have beyond 10 the front also have 10 behind ??
– Vision Development
WHERE
dataMovimento
BETWEEN DATE_ADD(CURRENT_DATE(), INTERVAL -10 DAY) AND DATE_ADD(CURRENT_DATE(), INTERVAL 10 DAY)– Carlos Mesquita Aguiar
That’s right man, thank you!!
– Vision Development
Glad I could help you, man!
– Carlos Mesquita Aguiar