Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. $qb = $this->createQueryBuilder('u');
  2. $qb->innerJoin('Entities\Client','c')
  3. //->where('u.client_id = :client_id')
  4. ->where($qb->expr()->like('p.client_id',':client_id'))
  5. ->andWhere('u.username = :username')
  6. ->andWhere('u.password = :password')
  7. ->setParameters(
  8. array(
  9. 'client_id' => $client_id,
  10. 'username' => $username,
  11. 'password' => $password
  12. )
  13. );
  14.  
  15.  
  16. $qb->getDql() - outputs:
  17.  
  18. SELECT u FROM Entities\ClientUser u INNER JOIN Entities\Client c WHERE (p.client_id LIKE :client_id) AND (u.username = :username) AND (u.password = :password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement