當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。