DQL Doctrine with WHERE does not work

0

Good afternoon!

I'm trying to perform a query on a user table that has FK from 4 other tables, but I guess that's not the case, and I make 2 filters in WHERE, for example WHERE login = 'string' AND id <> numero; . But it does not return anything, obs: I 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, right? I'm doing as in the documentation example: link .

Follow the code in the pastebin: link

    
asked by anonymous 24.07.2014 / 21:54

1 answer

1

I found the error. In:

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

I changed:

return $this->queryDAO($dql);

by

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

I took the $param to test only the script with the variables directly in it, I forgot to add it later ... It gives a rage when it's bullshit! hehehe

    
28.07.2014 / 18:50