0
I’m trying to get the records that are processed No (Datetime) less than 2 days from the current date.
I am starting from the following reasoning.
public function obtemSolicitacoesAntigasParaDeletar($executar = true){
$qb = $this->buscar(array(), false);
$qb->Where('sol.processadoEm < :data');
$params[':data'] = 'CURRENT_DATE() - INTERVAL 2 DAY';
$qb->setParameters($params);
return $executar === true ? $qb->getQuery()->getResult() : $qb;
}
But I am realizing that it is not working accordingly, it returns me record that do not satisfy this restriction.
In the SQL command this Query works, but in Doctrine it is not. Can someone help me adjust this method?
Att. Felipe.
There is no concept of "close topic" here. It is you who has to validate your own answer.
– Rodrigo Rigotti