sorry but I'm still in this code on time and can not solve:
I've checked and the parameters are coming properly
*original code (does not work rowCount return 0):*
$qb->select('a.usuarioCod')
->from('_permissao', 'a')
->innerJoin('a', '_acao_modulo', 'b', 'a.acaoModuloCod =
b.acaoModuloCod')
->innerJoin('b', '_modulo', 'c', 'c.moduloCod =
b.moduloCod')
->where($qb->expr()->eq('a.usuarioCod', ':usuarioCod'))
->andWhere($qb->expr()->eq('b.acaoModuloIdPermissao',
':acaoModuloIdPermissao'))
->andWhere($qb->expr()->eq('c.moduloNome', ':moduloNome'))
->setParameter(':usuarioCod', $usuarioCod)
->setParameter(':acaoModuloIdPermissao',
$qb->expr()->literal($acaoModuloIdPermissao))
->setParameter(':moduloNome',
$qb->expr()->literal($moduloNome));
$nl = $qb->execute();
echo $nl->rowCount()." <- total"; //Return 0
*it works (rowCount return 1)*
$qb->select('a.usuarioCod')
->from('_permissao', 'a')
->innerJoin('a', '_acao_modulo', 'b', 'a.acaoModuloCod =
b.acaoModuloCod')
->innerJoin('b', '_modulo', 'c', 'c.moduloCod =
b.moduloCod')
->where($qb->expr()->eq('a.usuarioCod', '2'))
->andWhere($qb->expr()->eq('b.acaoModuloIdPermissao',
"'filtrar'"))
->andWhere($qb->expr()->eq('c.moduloNome', "'Modulo'"));
$nl = $qb->execute();
echo $nl->rowCount()." <- total"; //Return 1
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.