All pastes #947491 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-03-18 15:23 UTC
rendered paste body
$q = Doctrine_Query::create()->from('mgw_MgwProjects p');
$q->leftJoin('p.Occupation');
$q->addWhere('id = ?',$this->aParam['id']);
var_dump($q->getSql());

/* generates

"SELECT m.id AS m__id, m.name AS m__name, m.description AS m__description, m.parentid AS m__parentid, m.companyid AS m__companyid, m.contactid AS m__contactid, m.projleaderid AS m__projleaderid, m.keyaccountid AS m__keyaccountid, m.startdate AS m__startdate, m.enddate AS m__enddate, m.status AS m__status, m.lu_user AS m__lu_user, m.owner AS m__owner, m.lu_date AS m__lu_date, m2.id AS m2__id, m2.name AS m2__name, m2.description AS m2__description, m2.owner AS m2__owner, m2.lu_user AS m2__lu_user, m2.lu_date AS m2__lu_date, m4.id AS m4__id, m4.name AS m4__name, m4.description AS m4__description, m4.owner AS m4__owner, m4.lu_user AS m4__lu_user, m4.lu_date AS m4__lu_date FROM mgw_projects m LEFT JOIN mgw_jobhours_occupation2project m3 ON m.id = m3.project_id LEFT JOIN mgw_jobhours_occupation m2 ON m2.id = m3.occupation_id LEFT JOIN mgw_jobhours_occupation2project m3 ON m.id = m3.project_id LEFT JOIN mgw_jobhours_o

*/