当前位置: 首页>>代码示例>>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;未经允许,请勿转载。