當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Doctrine_Query::leftJoin方法代碼示例

本文整理匯總了PHP中Doctrine_Query::leftJoin方法的典型用法代碼示例。如果您正苦於以下問題:PHP Doctrine_Query::leftJoin方法的具體用法?PHP Doctrine_Query::leftJoin怎麽用?PHP Doctrine_Query::leftJoin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Doctrine_Query的用法示例。


在下文中一共展示了Doctrine_Query::leftJoin方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: listPeriodeFiliereRegion

 public function listPeriodeFiliereRegion(Doctrine_Query $q)
 {
     $rootAlias = $q->getRootAlias();
     $q->leftJoin($rootAlias . '.CopisimFiliere c');
     $q->leftJoin($rootAlias . '.CopisimRegion d');
     return $q;
 }
開發者ID:googlecode-mirror,項目名稱:copisim,代碼行數:7,代碼來源:CopisimPeriodeTable.class.php

示例2: addProductTranslationJoin

 public function addProductTranslationJoin(Doctrine_Query $q, $lang = false)
 {
     if (!$lang) {
         return $q->leftJoin($q->getRootAlias() . '.Translation trans');
     } else {
         return $q->leftJoin($q->getRootAlias() . '.Translation trans WITH trans.lang = ?', $lang);
     }
 }
開發者ID:vcgato29,項目名稱:poff,代碼行數:8,代碼來源:ProductTable.class.php

示例3: retrieveAdminChargeList

 public function retrieveAdminChargeList(Doctrine_Query $q)
 {
     $rootAlias = $q->getRootAlias();
     $q->leftJoin($rootAlias . '.Category ct');
     $q->leftJoin($rootAlias . '.Vehicle v');
     $q->andWhere('v.is_archived = ?', false);
     return $q;
 }
開發者ID:rbolliger,項目名稱:otokou,代碼行數:8,代碼來源:ChargeTable.class.php

示例4: buildQuery

 function buildQuery(Doctrine_Query $query)
 {
     $query->leftJoin('swBlogPost.Translation');
     $query->leftJoin('swBlogPost.swBlogPostTags t');
     $query->leftJoin('t.Translation tt');
     if (strlen($this->getValue('tag')) > 0) {
         $query->addWhere('tt.name = ? and tt.lang = ?', array($this->getValue('tag'), sfContext::getInstance()->getUser()->getCulture()));
     }
     if (!is_null($this->getValue('published'))) {
         $query->addWhere('swBlogPost.published = ?', $this->getValue('published'));
     }
     $query->orderBy('created_at DESC');
     return $query;
 }
開發者ID:rande,項目名稱:swBlogPlugin,代碼行數:14,代碼來源:baseSwBlogPostsDatagrid.class.php

示例5: filterByEditable

 public function filterByEditable(Doctrine_Query $q, $user_id = null)
 {
     if (is_null($user_id)) {
         $user_id = sfContext::getInstance()->getUser()->getGuardUser()->getId();
         if (sfContext::getInstance()->getUser()->hasCredential('admin')) {
             return;
         }
     }
     $rootAlias = $q->getRootAlias();
     $q->leftJoin($rootAlias . '.Categories c');
     $q->leftJoin('c.Users u');
     $q->leftJoin($rootAlias . '.Editors e');
     $q->addWhere('author_id = ? OR u.id = ? OR e.id = ?', array($user_id, $user_id, $user_id));
 }
開發者ID:quafzi,項目名稱:timpany-prototype,代碼行數:14,代碼來源:PluginaBlogItemTable.class.php

示例6: setDoctrineQuery

 /**
  * Set Doctrine Query.
  *
  * Set the Doctrine Query Object and expand configuration with it's information.
  *
  * @param Doctrine_Query $query  Doctrine Query Object.
  * @param array          $filter Filter object to be processed to enrich the Query.
  *
  * @return void
  */
 public function setDoctrineQuery(Doctrine_Query $query, $filter)
 {
     $this->resetColumns();
     $this->_doctrineQuery = $query;
     $tables = $this->_getTableInformation();
     $aliasMap = $this->_doctrineQuery->getTableAliasMap();
     $tables = $this->_enrichTablesWithAlias($tables, $aliasMap);
     // FIXME assumes any dynamic relation with first table found on FROM
     $from = $this->_doctrineQuery->getDQLPart('from');
     $main = explode(' ', $from[0]);
     $main = $main[1];
     // adds the external relation aliases
     // depending on the filter object to process
     $joins = array();
     $this->_getFilterRelations($joins, $filter);
     // stores the tables => dynaalias
     $t = array();
     $a = 'dynajoin1';
     foreach ($joins as $join) {
         $alias = substr($join, 0, strpos($join, ':'));
         $t[$alias] = $a;
         // add the dynamic left join
         $this->_doctrineQuery->leftJoin("{$main}.{$alias} {$a}");
         $a++;
     }
     $this->_setColumnsFromDoctrineTables($tables, $t);
 }
開發者ID:projectesIF,項目名稱:Sirius,代碼行數:37,代碼來源:Config.php

示例7: retrieveAsso

 public function retrieveAsso(Doctrine_Query $q)
 {
     $alias = $q->getRootAlias();
     $q->select("{$alias}.name, {$alias}.login, {$alias}.description, {$alias}.logo, {$alias}.salle, {$alias}.phone, {$alias}.facebook, p.id, p.asso_id, p.couleur");
     $q->leftJoin("{$alias}.Pole p");
     return $q->fetchOne();
 }
開發者ID:TheoJD,項目名稱:portail,代碼行數:7,代碼來源:AssoTable.class.php

示例8: retrieveFolderList

 public function retrieveFolderList(Doctrine_Query $q)
 {
     $alias = $q->getRootAlias();
     $q->leftJoin($alias . '.Assets a');
     $q->orderBy($alias . '.lft');
     return $q;
 }
開發者ID:hartym,項目名稱:lyMediaManagerPlugin,代碼行數:7,代碼來源:PluginlyMediaFolderTable.class.php

示例9: retrieveBackendUuserList

 /**
  * Query for uuser list
  * @param Doctrine_Query $q
  * @return Doctrine_Query
  */
 public function retrieveBackendUuserList(Doctrine_Query $q)
 {
     $rootAlias = $q->getRootAlias();
     $q->leftJoin($rootAlias . '.BalanceUser bu');
     $q->andWhere($rootAlias . '.utype=?', 'uuser');
     $q->andWhere($rootAlias . '.password IS NOT NULL');
     return $q;
 }
開發者ID:rollmax,項目名稱:read2read,代碼行數:13,代碼來源:UserTable.class.php

示例10: addCodeColumnQuery

 public function addCodeColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if ($values != "") {
         $alias = $query->getRootAlias();
         $conn_MGR = Doctrine_Manager::connection();
         $query->leftJoin($alias . '.SpecimensCodes cod')->andWhere("cod.referenced_relation = ?", array('specimens'))->andWhere("cod.record_id = {$alias}.id")->andWhere("cod.full_code_indexed = fullToIndex(" . $conn_MGR->quote($values, 'string') . ") ");
     }
     return $query;
 }
開發者ID:naturalsciences,項目名稱:Darwin,代碼行數:9,代碼來源:SpecimensSelfFormFilter.class.php

示例11: addKernbegripListColumnQuery

 public function addKernbegripListColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if (!is_array($values)) {
         $values = array($values);
     }
     if (!count($values)) {
         return;
     }
     $query->leftJoin('r.expertKernbegrip expertKernbegrip')->andWhereIn('expertKernbegrip.kernbegrip_id', $values);
 }
開發者ID:robinkanters,項目名稱:dnsleergemeenschap,代碼行數:10,代碼來源:BaseexpertFormFilter.class.php

示例12: addAccepterListColumnQuery

 public function addAccepterListColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if (!is_array($values)) {
         $values = array($values);
     }
     if (!count($values)) {
         return;
     }
     $query->leftJoin($query->getRootAlias() . '.Friend Friend')->andWhereIn('Friend.accepter_id', $values);
 }
開發者ID:limitium,項目名稱:uberlov,代碼行數:10,代碼來源:BasesfGuardUserProfileFormFilter.class.php

示例13: addTrackListColumnQuery

 public function addTrackListColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if (!is_array($values)) {
         $values = array($values);
     }
     if (!count($values)) {
         return;
     }
     $query->leftJoin($query->getRootAlias() . '.userPlaylist userPlaylist')->andWhereIn('userPlaylist.track_id', $values);
 }
開發者ID:hielh,項目名稱:abjihproject,代碼行數:10,代碼來源:BasesfGuardUserFormFilter.class.php

示例14: addVehiclesListColumnQuery

 public function addVehiclesListColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if (!is_array($values)) {
         $values = array($values);
     }
     if (!count($values)) {
         return;
     }
     $query->leftJoin($query->getRootAlias() . '.ReportVehicle ReportVehicle')->andWhereIn('ReportVehicle.vehicle_id', $values);
 }
開發者ID:rbolliger,項目名稱:otokou,代碼行數:10,代碼來源:BaseReportFormFilter.class.php

示例15: addProceduresListColumnQuery

 public function addProceduresListColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if (!is_array($values)) {
         $values = array($values);
     }
     if (!count($values)) {
         return;
     }
     $query->leftJoin('r.UserProcedure UserProcedure')->andWhereIn('UserProcedure.procedure_id', $values);
 }
開發者ID:retrofox,項目名稱:Huemul,代碼行數:10,代碼來源:BasesfGuardUserFormFilter.class.php


注:本文中的Doctrine_Query::leftJoin方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。