Doctrine DQL with WHERE does not work

Asked

Viewed 100 times

1

Good afternoon!

I’m trying to perform a query in a table of users that has FK of 4 other tables, but I believe that is not the case, and perform 2 filters in WHERE, for example WHERE login = 'string' AND id <> numero;. But nothing comes back, Obs.: put the exact information to bring a record of the table.

Out of curiosity I tested without these conditions, without the WHERE, and brings all the records of the table. So I think it might be syntax error, is it? I am doing as it is in the example of documentation: http://docs.doctrine-project.org/en/2.1/reference/dql-doctrine-query-language.html.

Follow the code in the Pastebin: http://pastebin.com/xXpctT4v

1 answer

1


I found the mistake. In:

//** UsuariosDAO.php extends DAO.php **//
public function queryChkLogin(\Projeto\Core\Model\Usuarios $usuario)

I traded:

return $this->queryDAO($dql);

for

return $this->queryDAO($dql, $param);

I took the $param To test only the script with the variables right in it, I forgot to add it after... It gives an anger when it’s bullshit like that saw! hehehe

Browser other questions tagged

You are not signed in. Login or sign up in order to post.