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


PHP JDatabaseDriver::loadObjectList方法代碼示例

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


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

示例1: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\EasySocial(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load(array $ids)
 {
     if (count($ids) > 0) {
         $query = $this->db->getQuery(true);
         $query->select('a.id AS user_id, a.name, a.username, ' . 'b.alias, b.permalink, ' . 'c.small, c.medium, c.square, c.large')->from($this->db->quoteName('#__users', 'a'))->leftJoin($this->db->quoteName('#__social_users', 'b') . ' ON a.id = b.user_id')->leftJoin($this->db->quoteName('#__social_avatars', 'c') . ' ON a.id = c.uid')->where('a.id IN ( ' . implode(',', $ids) . ')');
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList('user_id');
     }
 }
開發者ID:ITPrism,項目名稱:SocialCommunityDistribution,代碼行數:21,代碼來源:EasySocial.php

示例2: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\EasySocial(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load(array $ids)
 {
     if (!empty($ids)) {
         $query = $this->db->getQuery(true);
         $query->select("a.id AS user_id, a.name, a.username, " . "b.alias, b.permalink, " . "c.small, c.medium, c.square, c.large")->from($this->db->quoteName("#__users", "a"))->leftJoin($this->db->quoteName("#__social_users", "b") . " ON a.id = b.user_id")->leftJoin($this->db->quoteName("#__social_avatars", "c") . " ON a.id = c.uid")->where("a.id IN ( " . implode(",", $ids) . ")");
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList("user_id");
     }
 }
開發者ID:pashakiz,項目名稱:crowdf,代碼行數:21,代碼來源:EasySocial.php

示例3: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\JomSocial(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load(array $ids)
 {
     if (!empty($ids)) {
         $query = $this->db->getQuery(true);
         $query->select("a.userid AS user_id, a.avatar, a.thumb")->from($this->db->quoteName("#__community_users", "a"))->where("a.userid IN ( " . implode(",", $ids) . ")");
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList("user_id");
     }
 }
開發者ID:pashakiz,項目名稱:crowdf,代碼行數:21,代碼來源:JomSocial.php

示例4: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\Gravatar(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load(array $ids)
 {
     if (count($ids) > 0) {
         $query = $this->db->getQuery(true);
         $query->select('a.id AS user_id, a.email, MD5(a.email) as hash')->from($this->db->quoteName('#__users', 'a'))->where('a.id IN ( ' . implode(',', $ids) . ')');
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList('user_id');
     }
 }
開發者ID:ITPrism,項目名稱:SocialCommunityDistribution,代碼行數:21,代碼來源:Gravatar.php

示例5: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\Gravatar(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load(array $ids)
 {
     if (!empty($ids)) {
         $query = $this->db->getQuery(true);
         $query->select("a.id AS user_id, a.email, MD5(a.email) as hash")->from($this->db->quoteName("#__users", "a"))->where("a.id IN ( " . implode(",", $ids) . ")");
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList("user_id");
     }
 }
開發者ID:pashakiz,項目名稱:crowdf,代碼行數:21,代碼來源:Gravatar.php

示例6: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\JomSocial(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load(array $ids)
 {
     if (count($ids) > 0) {
         $query = $this->db->getQuery(true);
         $query->select('a.userid AS user_id, a.avatar, a.thumb')->from($this->db->quoteName('#__community_users', 'a'))->where('a.userid IN ( ' . implode(',', $ids) . ')');
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList('user_id');
     }
 }
開發者ID:bellodox,項目名稱:PrismLibrary,代碼行數:21,代碼來源:JomSocial.php

示例7: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\EasyProfile(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load(array $ids)
 {
     if (count($ids) > 0) {
         // Create a new query object.
         $query = $this->db->getQuery(true);
         $query->select('a.id AS user_id, a.avatar, ' . $query->concatenate(array('b.id', 'b.username'), ':') . ' AS slug')->from($this->db->quoteName('#__jsn_users', 'a'))->innerJoin($this->db->quoteName('#__users', 'b') . ' ON a.id = b.id')->where('a.id IN ( ' . implode(',', $ids) . ')');
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList('user_id');
     }
 }
開發者ID:ITPrism,項目名稱:SocialCommunityDistribution,代碼行數:22,代碼來源:EasyProfile.php

示例8: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\CommunityBuilder(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load(array $ids)
 {
     if (!empty($ids)) {
         // Create a new query object.
         $query = $this->db->getQuery(true);
         $query->select("a.id AS user_id, a.name, " . "b.avatar, " . $query->concatenate(array("a.id", "a.username"), ":") . " AS slug")->from($this->db->quoteName("#__users", "a"))->innerJoin($this->db->quoteName("#__comprofiler", "b") . " ON a.id = b.user_id")->where("a.id IN ( " . implode(",", $ids) . ")");
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList("user_id");
     }
 }
開發者ID:pashakiz,項目名稱:crowdf,代碼行數:22,代碼來源:CommunityBuilder.php

示例9: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\SocialCommunity(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load(array $ids)
 {
     if (!empty($ids)) {
         // Create a new query object.
         $query = $this->db->getQuery(true);
         $query->select("a.id AS user_id, a.image_icon, a.image_small, a.image_square, a.image, " . $query->concatenate(array("a.id", "a.alias"), ":") . " AS slug, " . "b.name as location, b.country_code")->from($this->db->quoteName("#__itpsc_profiles", "a"))->leftJoin($this->db->quoteName("#__itpsc_locations", "b") . " ON a.location_id = b.id")->where("a.id IN ( " . implode(",", $ids) . ")");
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList("user_id");
     }
 }
開發者ID:pashakiz,項目名稱:crowdf,代碼行數:22,代碼來源:SocialCommunity.php

示例10: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\Kunena(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $userIds
  */
 public function load(array $userIds)
 {
     if (count($userIds) > 0) {
         // Create a new query object.
         $query = $this->db->getQuery(true);
         $query->select('a.userid AS user_id, a.avatar')->from($this->db->quoteName('#__kunena_users', 'a'))->where('a.userid IN ( ' . implode(',', $userIds) . ')');
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList('user_id');
     }
 }
開發者ID:ITPrism,項目名稱:GamificationDistribution,代碼行數:22,代碼來源:Kunena.php

示例11: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\Kunena(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load(array $ids)
 {
     if (!empty($ids)) {
         // Create a new query object.
         $query = $this->db->getQuery(true);
         $query->select("a.userid AS user_id, a.avatar")->from($this->db->quoteName("#__kunena_users", "a"))->where("a.userid IN ( " . implode(",", $ids) . ")");
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList("user_id");
     }
 }
開發者ID:pashakiz,項目名稱:crowdf,代碼行數:22,代碼來源:Kunena.php

示例12: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new Prism\Integration\Profiles\SocialCommunity(\JFactory::getDbo());
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load(array $ids)
 {
     if (count($ids) > 0) {
         // Create a new query object.
         $query = $this->db->getQuery(true);
         $query->select('a.id AS user_id, a.image_icon, a.image_small, a.image_square, a.image, ' . $query->concatenate(array('a.id', 'a.alias'), ':') . ' AS slug, ' . 'b.name as location, b.country_code')->from($this->db->quoteName('#__itpsc_profiles', 'a'))->leftJoin($this->db->quoteName('#__itpsc_locations', 'b') . ' ON a.location_id = b.id')->where('a.id IN ( ' . implode(',', $ids) . ')');
         $this->db->setQuery($query);
         $this->profiles = (array) $this->db->loadObjectList('user_id');
     }
 }
開發者ID:bellodox,項目名稱:PrismLibrary,代碼行數:22,代碼來源:SocialCommunity.php

示例13: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new ITPrismIntegrateProfilesEasySocial();
  * $profiles->load($ids);
  * </code>
  *
  * @param $ids
  */
 public function load($ids)
 {
     if (!empty($ids)) {
         $query = $this->db->getQuery(true);
         $query->select("a.id AS user_id, a.name, a.username, " . "b.alias, b.permalink, " . "c.medium AS avatar")->from($this->db->quoteName("#__users", "a"))->leftJoin($this->db->quoteName("#__social_users", "b") . " ON a.id = b.user_id")->leftJoin($this->db->quoteName("#__social_avatars", "c") . " ON a.id = c.uid")->where("a.id IN ( " . implode(",", $ids) . ")");
         $this->db->setQuery($query);
         $results = $this->db->loadObjectList();
         if (!empty($results)) {
             foreach ($results as $result) {
                 $this->profiles[$result->user_id] = $result;
             }
         }
     }
 }
開發者ID:johngrange,項目名稱:wookeyholeweb,代碼行數:26,代碼來源:easysocial.php

示例14: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new ITPrismIntegrateProfilesGravatar();
  * $profiles->load($ids);
  * </code>
  *
  * @param $ids
  */
 public function load($ids)
 {
     if (!empty($ids)) {
         $query = $this->db->getQuery(true);
         $query->select("a.id AS user_id, a.email")->from($this->db->quoteName("#__users", "a"))->where("a.id IN ( " . implode(",", $ids) . ")");
         $this->db->setQuery($query);
         $results = $this->db->loadObjectList();
         if (!empty($results)) {
             foreach ($results as $result) {
                 $this->profiles[$result->user_id] = $result;
             }
         }
     }
 }
開發者ID:johngrange,項目名稱:wookeyholeweb,代碼行數:26,代碼來源:gravatar.php

示例15: load

 /**
  * Load data about profiles from database.
  *
  * <code>
  * $ids = array(1, 2, 3, 4);
  *
  * $profiles = new ITPrismIntegrateProfilesSocialCommunity();
  * $profiles->load($ids);
  * </code>
  *
  * @param array $ids
  */
 public function load($ids)
 {
     if (!empty($ids)) {
         // Create a new query object.
         $query = $this->db->getQuery(true);
         $query->select("a.id AS user_id, a.image_square AS avatar, a.image_small as avatar_small, " . $query->concatenate(array("a.id", "a.alias"), ":") . " AS slug, " . "b.name as location, b.country_code")->from($this->db->quoteName("#__itpsc_profiles", "a"))->leftJoin($this->db->quoteName("#__itpsc_locations", "b") . " ON a.location_id = b.id")->where("a.id IN ( " . implode(",", $ids) . ")");
         $this->db->setQuery($query);
         $results = $this->db->loadObjectList();
         if (!empty($results)) {
             foreach ($results as $result) {
                 $this->profiles[$result->user_id] = $result;
             }
         }
     }
 }
開發者ID:johngrange,項目名稱:wookeyholeweb,代碼行數:27,代碼來源:socialcommunity.php


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