当前位置: 首页>>代码示例>>PHP>>正文


PHP Doctrine_Query::innerJoin方法代码示例

本文整理汇总了PHP中Doctrine_Query::innerJoin方法的典型用法代码示例。如果您正苦于以下问题:PHP Doctrine_Query::innerJoin方法的具体用法?PHP Doctrine_Query::innerJoin怎么用?PHP Doctrine_Query::innerJoin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doctrine_Query的用法示例。


在下文中一共展示了Doctrine_Query::innerJoin方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testBug

 public function testBug()
 {
     $person = $this->newPerson('Fixe');
     $profile = $this->newProfile('Work', $person);
     $guardUser = $person->get('sfGuardUser');
     $id = $guardUser->get('id');
     $guardUser->free();
     $query = new Doctrine_Query();
     $query->select('s.*, p.*, ps.*');
     $query->from('sfGuardUser s');
     $query->innerJoin('s.Person p');
     $query->leftJoin('p.Profiles ps');
     $query->where('s.id = ?', $id);
     $user = $query->fetchOne();
     $array = $user->toArray(true);
     $this->assertEqual($array['id'], 1);
     $this->assertEqual($array['name'], 'Fixe');
     $this->assertTrue(isset($array['Person']['Profiles'][0]));
 }
开发者ID:dennybrandes,项目名称:doctrine1,代码行数:19,代码来源:876TestCase.php

示例2: limitToHosts

 public function limitToHosts(Doctrine_Query $q, array $hosts = array())
 {
     if (empty($hosts)) {
         return $q;
     }
     $byName = array();
     $byId = array();
     foreach ($hosts as $host) {
         if (is_string($host)) {
             $byName[] = $host;
         } else {
             if (is_int($host)) {
                 $byId[] = $host;
             } else {
                 if ($host instanceof IcingaHosts) {
                     $byId[] = $host->host_id;
                 }
             }
         }
     }
     $q->innerJoin('s.host h')->whereIn("h.display_name", $byName)->orWhereIn("h.host_id", $byId);
 }
开发者ID:philippjenni,项目名称:icinga-web,代码行数:22,代码来源:ApiServiceRequestModel.class.php

示例3: commonActivityConstraints

 static function commonActivityConstraints(Doctrine_Query $q, $culture = 'et')
 {
     if ($q->hasAliasDeclaration('p') || $q->getRootAlias() == 'p') {
         $q->innerJoin('p.Translation constraintTranslation WITH constraintTranslation.lang = ? AND constraintTranslation.name != ""', $culture);
     }
     return $q;
 }
开发者ID:vcgato29,项目名称:poff,代码行数:7,代码来源:ProductTable.class.php

示例4: addCategoriesListColumnQuery

 public function addCategoriesListColumnQuery(Doctrine_Query $query, $field, $value)
 {
     if (!strlen($value)) {
         return;
     }
     if ($value === '-') {
         $query->leftJoin($query->getRootAlias() . '.Categories c')->andWhere('c.id IS NULL');
     } else {
         $query->innerJoin($query->getRootAlias() . '.Categories c WITH c.id = ?', $value);
     }
 }
开发者ID:existanze,项目名称:apostropheBlogPlugin,代码行数:11,代码来源:PluginaBlogItemFormFilter.class.php

示例5: retrieveWithQuestionsForList

 public function retrieveWithQuestionsForList(Doctrine_Query $q)
 {
     $rootAlias = $q->getRootAlias();
     $q->innerJoin($rootAlias . '.Question q');
     return $q;
 }
开发者ID:stinol,项目名称:PHPTest,代码行数:6,代码来源:AnswerTable.class.php

示例6: addRelativesColumnQuery

 protected function addRelativesColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if ($values[0]) {
         $query->innerJoin('r.NewsGroup ng ')->innerJoin('ng.StructureNewsGroup sng WITH sng.structure_id = ?', $values[0]);
     }
 }
开发者ID:vcgato29,项目名称:poff,代码行数:6,代码来源:NewItemFormFilter.class.php

示例7: retrieveAssetList

 /**
  * Retrieves a list of assets.
  * table_method in list configuration of lyMediaAsset module
  *
  * @param Doctrine_Query $q
  */
 public function retrieveAssetList(Doctrine_Query $q)
 {
     $q->innerJoin($q->getRootAlias() . '.Folder f');
     return $q;
 }
开发者ID:vjousse,项目名称:lyMediaManagerPlugin,代码行数:11,代码来源:PluginlyMediaAssetTable.class.php

示例8: addRelativesColumnQuery

 protected function addRelativesColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if ($values) {
         $query->innerJoin('r.BannerGroup bg')->innerJoin('bg.StructureBannerGroups sbg WITH sbg.structure_id = ? ', $values);
     }
 }
开发者ID:vcgato29,项目名称:poff,代码行数:6,代码来源:BannerFormFilter.class.php

示例9: addProductGroupColumnQuery

 protected function addProductGroupColumnQuery(Doctrine_Query $query, $field, $values)
 {
     if ($values) {
         $query->innerJoin('r.ProductGroups pgs')->andWhereIn('pgs.group_id', $values);
     }
 }
开发者ID:vcgato29,项目名称:poff,代码行数:6,代码来源:ProductFormFilter.class.php

示例10: addExtensionRequirement

 static function addExtensionRequirement(Doctrine_Query $q, $extensions, $entityAlias = 'e', $aliasSuffix = '')
 {
     return $q->innerJoin($entityAlias . '.ExtensionRecord eerr' . $aliasSuffix)->innerJoin('eerr' . $aliasSuffix . '.Definition dd' . $aliasSuffix)->andWhereIn('dd' . $aliasSuffix . '.name', (array) $extensions);
 }
开发者ID:silky,项目名称:littlesis,代码行数:4,代码来源:LsQuery.class.php


注:本文中的Doctrine_Query::innerJoin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。