1
I have to check if the user has registered an expiration date, if yes, I check if that date is lower than today if it is, it shows if it does not hide, I did so:
$this->noticia = Doctrine::getTable('Noticias')->createQuery('s')
->select('s.*')
->where("situacao = ?", 'ativo')
->where("data_validade < ", 'date("Y-m-d")')
// tentei dessa maneira tambem
// criei uma variavel la em cima no escopo ++ $data = date("Y-m-d");
// e chamei ela assim(embaixo)
// ->where("data_validade < ") . $data
->orderBy('data_cadastro desc')
//->limit(5) // temp
->execute();
but in the browser, the page is all blank and no error appears. hmm. What can be ?
You are called two
where
one of them would not be aor
orand
?– rray
Yeah, I don’t know how to do that on Doctrine, I tried to go underneath the Where a ->AND, or the side of the first Where() AND, but it also didn’t roll
– Estácio Di Fabio