Skip to content

Instantly share code, notes, and snippets.

@tworzenieweb
Last active March 9, 2018 11:08
Show Gist options
  • Save tworzenieweb/acbe715f564c4dcd94edeaf7a79c1f6d to your computer and use it in GitHub Desktop.
Save tworzenieweb/acbe715f564c4dcd94edeaf7a79c1f6d to your computer and use it in GitHub Desktop.
Propel multiple conditions join
<?php
$query->addJoin(
[JobSponsoredPeer::ID, JobLocationPeer::JOB_TYPE],
[JobLocationPeer::JOB_ID, JobOffer::TYPE_SPONSORED],
Criteria::LEFT_JOIN
);
/**
* SELECT * FROM `job_sponsored`
* LEFT JOIN `job_location` ON (job_sponsored.id=job_location.job_id AND job_location.job_type=:p1)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment