Posted By

satie83 on 03/20/15


mysql sql doctrine2 symfony2

Versions (?)

PHP - Doctrine - Left join ON condition AND other condition syntax in Doctrine

 / Published in: PHP


In SQL I can get this by adding AND to the join

LEFT JOIN installations i ON = AND = :page This way I get the installation info for an app that has an installation on the page, but I get null values on the columns for app's that have installations on other pages or not at all.

Is there a way to do this in Doctrine or am I better off just getting all the installations for each application and then checking against the found page with php?


See function leftJoin in doc:

  1. ->leftJoin('a.installations', 'i', 'WITH', ' = :page')
  2. ->setParameter('page', $page)

Report this snippet  

You need to login to post a comment.