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


PHP xPDOQuery::innerJoin方法代码示例

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


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

示例1: prepareQueryBeforeCount

 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->innerJoin('galAlbumItem', 'AlbumItems', array('galItem.id = AlbumItems.item', 'AlbumItems.album' => $this->getProperty('album')));
     $c->innerJoin('galAlbum', 'Album', array('Album.id = AlbumItems.album'));
     $c->leftJoin('galTag', 'Tags');
     return $c;
 }
开发者ID:Piterden,项目名称:modx_testfloor,代码行数:7,代码来源:getlist.class.php

示例2: prepareQueryBeforeCount

 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->innerJoin('modUserGroupRole', 'UserGroupRole');
     $c->innerJoin('modUserGroup', 'UserGroup');
     $c->innerJoin('modUser', 'User', array('User.id' => 'modUserGroupMember.member', 'User.id' => $this->getProperty('user')));
     $c->where(array('modUserGroupMember.member' => $this->getProperty('user')));
     return $c;
 }
开发者ID:adamwintle,项目名称:flexibility5,代码行数:8,代码来源:getlist.class.php

示例3: prepareQueryBeforeCount

 /**
  * @param xPDOQuery $c
  *
  * @return xPDOQuery
  */
 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->where(array('referrer_id' => $this->getProperty('referrer_id')));
     $c->groupby($this->classKey . '.id');
     $c->select($this->modx->getSelectColumns($this->classKey, $this->classKey));
     $c->innerJoin('modUser', 'User', $this->classKey . '.id = User.id');
     $c->select('User.username');
     $c->innerJoin('modUserProfile', 'UserProfile', $this->classKey . '.id = UserProfile.internalKey');
     $c->select('UserProfile.fullname');
     return $c;
 }
开发者ID:bendasvadim,项目名称:msProfile,代码行数:16,代码来源:getlist.class.php

示例4: prepareQueryBeforeCount

 /**
  * @param xPDOQuery $c
  *
  * @return xPDOQuery
  */
 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->innerJoin('modUser', 'User');
     $c->innerJoin('modUserProfile', 'UserProfile');
     $c->select($this->modx->getSelectColumns($this->classKey, $this->classKey));
     $c->select(array('username' => 'User.username', 'fullname' => 'UserProfile.fullname', 'active' => 'User.active', 'blocked' => 'UserProfile.blocked'));
     if ($query = $this->getProperty('query', null)) {
         $c->where(array('User.username:LIKE' => "%{$query}%", 'OR:UserProfile.fullname:LIKE' => "%{$query}%"));
     }
     return $c;
 }
开发者ID:soulcreate,项目名称:Tickets,代码行数:16,代码来源:getlist.class.php

示例5: prepareQueryBeforeCount

 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->innerJoin('modUserGroupMember', 'UserGroupMembers');
     $c->innerJoin('modUserGroup', 'UserGroup', 'UserGroupMembers.user_group = UserGroup.id');
     $c->leftJoin('modUserGroupRole', 'UserGroupRole', 'UserGroupMembers.role = UserGroupRole.id');
     $userGroup = $this->getProperty('usergroup', 0);
     $c->where(array('UserGroupMembers.user_group' => $userGroup));
     $username = $this->getProperty('username', '');
     if (!empty($username)) {
         $c->where(array('modUser.username:LIKE' => '%' . $username . '%'));
     }
     return $c;
 }
开发者ID:adamwintle,项目名称:flexibility5,代码行数:13,代码来源:getlist.class.php

示例6: prepareQueryBeforeCount

 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->innerJoin('modAccessPolicyTemplate', 'Template');
     $group = $this->getProperty('group');
     if (!empty($group)) {
         $group = is_array($group) ? $group : explode(',', $group);
         $c->innerJoin('modAccessPolicyTemplateGroup', 'TemplateGroup', 'TemplateGroup.id = Template.template_group');
         $c->where(array('TemplateGroup.name:IN' => $group));
     }
     $query = $this->getProperty('query', '');
     if (!empty($query)) {
         $c->where(array('modAccessPolicy.name:LIKE' => '%' . $query . '%', 'OR:modAccessPolicy.description:LIKE' => '%' . $query . '%'));
     }
     return $c;
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:15,代码来源:getlist.class.php

示例7: prepareQueryBeforeCount

 /**
  * @return mixed
  */
 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->select($this->modx->getSelectColumns('modManagerLog', 'modManagerLog', '', array('action'), true));
     //        $c->select($this->modx->getSelectColumns('modManagerLog','modManagerLog'));
     $c->select(array('User.username', 'Template.templatename', 'Chunk.name as chunkname', 'Snippet.name as snippetname', 'Plugin.name as pluginname', 'TV.name as tvname'));
     $c->innerJoin('modUser', 'User');
     $c->leftJoin('modTemplate', 'Template', '`modManagerLog`.item = `Template`.`id` AND `modManagerLog`.`classKey` = "modTemplate"');
     $c->leftJoin('modChunk', 'Chunk', '`modManagerLog`.item = `Chunk`.`id` AND `modManagerLog`.`classKey` = "modChunk"');
     $c->leftJoin('modSnippet', 'Snippet', '`modManagerLog`.item = `Snippet`.`id` AND `modManagerLog`.`classKey` = "modSnippet"');
     $c->leftJoin('modPlugin', 'Plugin', '`modManagerLog`.item = `Plugin`.`id` AND `modManagerLog`.`classKey` = "modPlugin"');
     $c->leftJoin('modTemplateVar', 'TV', '`modManagerLog`.item = `TV`.`id` AND `modManagerLog`.`classKey` = "modTemplateVar"');
     $query = trim($this->getProperty('query'));
     if ($query) {
         $c->where('(Template.templatename LIKE "%' . $query . '%" OR Chunk.name LIKE "%' . $query . '%" OR Snippet.name LIKE "%' . $query . '%" OR Plugin.name LIKE "%' . $query . '%" OR TV.name LIKE "%' . $query . '%")');
     } else {
         $c->where('(modManagerLog.action LIKE "template_%" OR modManagerLog.action LIKE "chunk_%" OR modManagerLog.action LIKE "snippet_%" OR modManagerLog.action LIKE "plugin_%" OR modManagerLog.action LIKE "tv_%")');
     }
     $user = intval($this->getProperty('user'));
     if ($user) {
         $c->andCondition(array('modManagerLog.user' => $user));
     }
     $dateStart = trim($this->getProperty('datestart'));
     if ($dateStart) {
         $dateStart = date('Y-m-d', strtotime($dateStart));
         $c->andCondition(array('modManagerLog.occurred:>=' => $dateStart));
     }
     $dateEnd = trim($this->getProperty('dateend'));
     if ($dateEnd) {
         $dateEnd = date('Y-m-d 23:59:59', strtotime($dateEnd));
         $c->andCondition(array('modManagerLog.occurred:<=' => $dateEnd));
     }
     return $c;
 }
开发者ID:sergant210,项目名称:AdminTools,代码行数:36,代码来源:getlist.class.php

示例8: prepareQueryBeforeCount

 /**
  * @param xPDOQuery $c
  *
  * @return xPDOQuery
  */
 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->innerJoin('sxNewsletter', 'sxNewsletter', 'sxNewsletter.id = sxQueue.newsletter_id');
     $c->select($this->modx->getSelectColumns('sxQueue', 'sxQueue'));
     $c->select('sxNewsletter.name as newsletter');
     return $c;
 }
开发者ID:ksneo,项目名称:Sendex,代码行数:12,代码来源:getlist.class.php

示例9: prepareQueryBeforeCount

 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->select(array('qsbSetUserGroup.*', 'UserGroup.name'));
     $c->innerJoin('modUserGroup', 'UserGroup');
     $c->where(array('set' => $this->getProperty('id')));
     return $c;
 }
开发者ID:Realetive,项目名称:QuickstartButtons,代码行数:7,代码来源:getlist.class.php

示例10: prepareQueryBeforeCount

 /**
  * @param xPDOQuery $c
  *
  * @return xPDOQuery
  */
 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->leftJoin('modMediaSource', 'Source');
     $c->leftJoin($this->classKey, 'Thumb', "`{$this->classKey}`.`id` = `Thumb`.`parent`");
     $c->groupby($this->classKey . '.id');
     $c->select('`Source`.`name` as `source_name`');
     $c->select('`Thumb`.`url` as `thumbnail`');
     $c->where(array('resource_id' => $this->getProperty('resource_id')));
     $parent = $this->getProperty('parent');
     if ($parent !== false) {
         $c->where(array('parent' => $parent));
     }
     $query = trim($this->getProperty('query'));
     if (!empty($query)) {
         $c->where(array('file:LIKE' => "%{$query}%", 'OR:name:LIKE' => "%{$query}%", 'OR:alt:LIKE' => "%{$query}%", 'OR:description:LIKE' => "%{$query}%", 'OR:add:LIKE' => "%{$query}%"));
     }
     $tags = array_map('trim', explode(',', $this->getProperty('tags')));
     if (!empty($tags[0])) {
         $tags = implode("','", $tags);
         $c->innerJoin('msResourceFileTag', 'Tag', "`{$this->classKey}`.`id` = `Tag`.`file_id` AND `Tag`.`tag` IN ('" . $tags . "')");
         $c->groupby($this->classKey . '.id');
         $c->prepare();
         $this->modx->log(1, $c->toSQL());
     }
     return $c;
 }
开发者ID:svyatoslavteterin,项目名称:belton.by,代码行数:31,代码来源:getlist.class.php

示例11: prepareQueryBeforeCount

 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->innerJoin('modAccessPolicyTemplateGroup', 'TemplateGroup');
     $query = $this->getProperty('query', '');
     if (!empty($query)) {
         $c->where(array('modAccessPolicyTemplate.name:LIKE' => '%' . $query . '%', 'OR:modAccessPolicyTemplate.description:LIKE' => '%' . $query . '%'));
     }
     return $c;
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:9,代码来源:getlist.class.php

示例12: prepareQueryBeforeCount

 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->innerJoin('modUser', 'Sender');
     $c->where(array('recipient' => $this->modx->user->get('id')));
     $search = $this->getProperty('search', '');
     if (!empty($search)) {
         $c->andCondition(array('subject:LIKE' => '%' . $search . '%', 'OR:message:LIKE' => '%' . $search . '%'), null, 2);
     }
     return $c;
 }
开发者ID:adamwintle,项目名称:flexibility5,代码行数:10,代码来源:getlist.class.php

示例13: prepareQueryBeforeCount

 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->innerJoin('msOrder', 'msOrder', '`msOrderProduct`.`order_id` = `msOrder`.`id`');
     $c->leftJoin('msProduct', 'msProduct', '`msOrderProduct`.`product_id` = `msProduct`.`id`');
     $c->leftJoin('msProductData', 'msProductData', '`msOrderProduct`.`product_id` = `msProductData`.`id`');
     $c->where(array('order_id' => $this->getProperty('order_id'), 'msOrder.user_id' => $this->modx->user->id));
     $c->select($this->modx->getSelectColumns('msOrderProduct', 'msOrderProduct'));
     $c->select($this->modx->getSelectColumns('msProduct', 'msProduct', 'product_'));
     $c->select($this->modx->getSelectColumns('msProductData', 'msProductData', 'product_', array('id'), true));
     return $c;
 }
开发者ID:sin4end,项目名称:Office,代码行数:11,代码来源:getlist.class.php

示例14: prepareQueryBeforeCount

 /**
  * Can be used to adjust the query prior to the COUNT statement
  *
  * @param xPDOQuery $c
  * @return xPDOQuery
  */
 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $props = $this->getProperties();
     if (!empty($props['tagId'])) {
         $c->where(array('tag_id' => $props['tagId']));
     }
     if (!empty($props['tvId'])) {
         $c->where(array('tmplvar_id' => $props['tvId']));
     }
     $c->innerJoin('smarttagResource', 'smarttagResource', 'smarttagResource.id = smarttagTagresources.resource_id');
     $c->select(array('smarttagTagresources.*', 'smarttagResource.pagetitle'));
     return $c;
 }
开发者ID:DeFi-ManriquezLuis,项目名称:MTLTransfer,代码行数:19,代码来源:getlist.class.php

示例15: prepareQueryBeforeCount

 /**
  * @param xPDOQuery $c
  * @return \xPDOQuery
  */
 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c->innerJoin('disCategory', 'Category');
     $c->leftJoin('disBoard', 'Parent');
     $c->select($this->modx->getSelectColumns('disBoard', 'disBoard', '', array('id', 'name')));
     $c->select($this->modx->getSelectColumns('disCategory', 'Category', 'category_', array('id', 'name')));
     $c->select($this->modx->getSelectColumns('disBoard', 'Parent', 'parent_', array('id', 'name')));
     $query = $this->getProperty('query');
     if (!empty($query)) {
         $c->where(array('disBoard.name:LIKE' => "%{$query}%"));
     }
     return $c;
 }
开发者ID:oneismore,项目名称:Discuss,代码行数:17,代码来源:getlist.class.php


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