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


PHP kshowPeer::doSelectJoinkuser方法代码示例

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


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

示例1: getTopBands

 public static function getTopBands($number_of_results = self::NUMBER_OF_TOP_TO_DISPLAY, $rand = true)
 {
     if (self::$s_top_list_cache == NULL) {
         self::$s_top_list_cache = new myCache("topList", self::TOP_LIST_EXPIRY_IN_SECONDS);
     }
     $top_list_name = "kshowBands";
     //get_class( $cls );
     $top_list_full = self::$s_top_list_cache->get($top_list_name);
     if ($top_list_full == NULL) {
         $featuredIds = array(26404, 42551, 31401, 31554, 12913, 18309, 13411, 11931, 15789, 13948, 13380, 13929, 21944, 23057);
         //$top_list_full = kshowPeer::retrieveByPks($featuredIds);
         $c = new Criteria();
         $c->add(kshowPeer::ID, $featuredIds, Criteria::IN);
         $top_list_full = kshowPeer::doSelectJoinkuser($c);
         self::$s_top_list_cache->put($top_list_name, $top_list_full);
     }
     //if ( $number_of_results < 1 ) $number_of_results = self::NUMBER_OF_TOP_TO_DISPLAY;
     if ($rand) {
         // shuffle the array and return the first  $number_of_results
         if (is_array($top_list_full)) {
             shuffle($top_list_full);
         }
     }
     if (count($top_list_full) > $number_of_results) {
         $top_list_full = array_slice($top_list_full, 0, $number_of_results);
     }
     return $top_list_full;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:28,代码来源:___myTopListUtils.class.php

示例2: execute

 /**
 	 * 
 select kshow.id,concat('http://www.kaltura.com/index.php/browse/bands?band_id=',indexed_custom_data_1),concat('http://profile.myspace.com/index.cfm?fuseaction=user.viewpr
 ofile&friendID=',indexed_custom_data_1) ,  kuser.screen_name , indexed_custom_data_1  from kshow ,kuser where kshow.partner_id=5 AND kuser.id=kshow.producer_id AND kshow.
 id>=10815  order by kshow.id ;
 ~
 */
 public function execute()
 {
     //	$this->forceSystemAuthentication();
     $from = $this->getRequestParameter("from", null);
     $to = $this->getRequestParameter("to", null);
     $limit = $this->getRequestParameter("limit", 100);
     $c = new Criteria();
     $c->setLimit($limit);
     $c->add(kshowPeer::PARTNER_ID, 5);
     // myspace
     $c->addAscendingOrderByColumn(kshowPeer::ID);
     if (!empty($from)) {
         $c->addAnd(kshowPeer::ID, $from, Criteria::GREATER_EQUAL);
     }
     if (!empty($to)) {
         $c->addAnd(kshowPeer::ID, $to, Criteria::LESS_EQUAL);
     }
     $this->band_list = kshowPeer::doSelectJoinkuser($c);
 }
开发者ID:DBezemer,项目名称:server,代码行数:26,代码来源:bandsAction.class.php

示例3: getCachedKshowList

 private static function getCachedKshowList($config_param_name, $fallback = NULL)
 {
     return array();
     self::init();
     // becuase the $config_param_name is unique in the config - use it in the cache too
     $cached_show_list = self::$s_cache->get($config_param_name);
     if ($cached_show_list == NULL) {
         // read the ids from config
         $id_list = self::$s_config->getList($config_param_name);
         if ($id_list == NULL && !$fallback) {
             $id_list = self::$s_config->getList($fallback);
         }
         if ($id_list == NULL) {
             throw new Exception("Cannot find featured list in app.yml (key=" . $config_param_name . ")");
         }
         $c = new Criteria();
         $c->add(kshowPeer::ID, $id_list, Criteria::IN);
         // fetch the real kshows from the DB
         $kshow_list = kshowPeer::doSelectJoinkuser($c);
         // create stub objects with only the minimum data from the real kshow
         $cached_show_list = array();
         $temp_array = array();
         // the order is not the one we had in the $id_list - it's sorted by the DB
         foreach ($kshow_list as $kshow) {
             $temp_array[$kshow->getId()] = new kshowStub($kshow);
         }
         $i = 0;
         foreach ($id_list as $id) {
             if (key_exists($id, $temp_array)) {
                 $cached_show_list[$i] = $temp_array[$id];
                 ++$i;
             }
         }
         // store the stub list in the cache for next time
         self::$s_cache->put($config_param_name, $cached_show_list);
     }
     return $cached_show_list;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:38,代码来源:myFeatureUtils.class.php

示例4: execute

 /**
  * Gives a system applicative snapsot
  */
 public function execute()
 {
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
     $this->forceSystemAuthentication();
     $partner_id = $this->getRequestParameter('partner_id', -1);
     if ($partner_id >= 0) {
         myPartnerUtils::applyPartnerFilters($partner_id);
     }
     $this->partner_id = $partner_id;
     $limit = $this->getRequestParameter('limit', '30');
     if ($limit > 300) {
         $limit = 300;
     }
     $bands_only = $this->getRequestParameter("bands", false) != null;
     $modified_only = $this->getRequestParameter("modified", false) != null;
     $this->bands_only = $bands_only;
     $this->modified_only = $modified_only;
     $this->kshows_with_new_entries = $modified_only ? dashboardUtils::getUpdatedKshows() : null;
     $yesterday = mktime(0, 0, 0, date("m"), date("d") - 1, date("Y"));
     $lastweek = mktime(0, 0, 0, date("m"), date("d") - 7, date("Y"));
     $query_esterday = date('Y-m-d', $yesterday);
     $query_lastweek = date('Y-m-d', $lastweek);
     $modified_band_ids = $modified_only ? array_keys($this->kshows_with_new_entries) : null;
     if ($modified_only) {
         // TODO - this chunk was copied from the code bellow with minor changes - generalize !
         $c = new Criteria();
         // 			$c->add ( kshowPeer::ID , $modified_band_ids , Criteria::IN ); // search only the given IDs
         $this->bandsOnly($bands_only, $modified_band_ids, $c, kshowPeer::PARTNER_ID);
         $this->kshow_count = kshowPeer::doCount($c);
         $criterion = $c->getNewCriterion(kshowPeer::CREATED_AT, $query_esterday, Criteria::GREATER_EQUAL);
         $c->add($criterion);
         $this->kshow_count1 = kshowPeer::doCount($c);
         $criterion = $c->getNewCriterion(kshowPeer::CREATED_AT, $query_lastweek, Criteria::GREATER_EQUAL);
         $c->add($criterion);
         $this->kshow_count7 = kshowPeer::doCount($c);
         $c->setLimit($limit);
         //$c->hints = array(kshowPeer::TABLE_NAME => "created_at_index");
         $c->addDescendingOrderByColumn(kshowPeer::CREATED_AT);
         $c->remove(kshowPeer::CREATED_AT);
         $c->addJoin(kshowPeer::PRODUCER_ID, kuserPeer::ID, Criteria::LEFT_JOIN);
         $this->kshows = kshowPeer::doSelectJoinkuser($c);
         $this->bands_only = $bands_only;
         $this->entry_count = 0;
         $this->entry_count1 = 0;
         $this->entry_count7 = 0;
         $this->entries = array();
         $this->kuser_count = 0;
         $this->kuser_count1 = 0;
         $this->kuser_count7 = 0;
         $this->kusers = array();
         dashboardUtils::updateKshowsRoughcutCount($this->kshows);
         return sfView::SUCCESS;
     }
     $c = new Criteria();
     $this->bandsOnly($bands_only, $modified_band_ids, $c, kshowPeer::PARTNER_ID);
     $this->kshow_count = kshowPeer::doCount($c);
     $d = new Criteria();
     $this->bandsOnly($bands_only, $modified_band_ids, $d, kshowPeer::PARTNER_ID);
     $criterion = $c->getNewCriterion(kshowPeer::CREATED_AT, $query_esterday, Criteria::GREATER_EQUAL);
     $d->add($criterion);
     $this->kshow_count1 = kshowPeer::doCount($d);
     $e = new Criteria();
     $this->bandsOnly($bands_only, $modified_band_ids, $e, kshowPeer::PARTNER_ID);
     $criterion = $c->getNewCriterion(kshowPeer::CREATED_AT, $query_lastweek, Criteria::GREATER_EQUAL);
     $e->add($criterion);
     $this->kshow_count7 = kshowPeer::doCount($e);
     //$this->kshow_count = kshowPeer::doCount( $c );
     $c->setLimit($limit);
     //$c->hints = array(kshowPeer::TABLE_NAME => "created_at_index");
     $c->addDescendingOrderByColumn(kshowPeer::CREATED_AT);
     $c->addJoin(kshowPeer::PRODUCER_ID, kuserPeer::ID, Criteria::LEFT_JOIN);
     $this->kshows = kshowPeer::doSelectJoinkuser($c);
     $c = new Criteria();
     $this->bandsOnly($bands_only, $modified_band_ids, $c, entryPeer::PARTNER_ID);
     $this->entry_count = entryPeer::doCount($c);
     $d = new Criteria();
     $this->bandsOnly($bands_only, $modified_band_ids, $d, entryPeer::PARTNER_ID);
     $criterion = $c->getNewCriterion(entryPeer::CREATED_AT, $query_esterday, Criteria::GREATER_EQUAL);
     $d->add($criterion);
     $this->entry_count1 = entryPeer::doCount($d);
     $e = new Criteria();
     $this->bandsOnly($bands_only, $modified_band_ids, $e, entryPeer::PARTNER_ID);
     $criterion = $c->getNewCriterion(entryPeer::CREATED_AT, $query_lastweek, Criteria::GREATER_EQUAL);
     $e->add($criterion);
     $this->entry_count7 = entryPeer::doCount($e);
     $c->setLimit($limit);
     //$c->hints = array(entryPeer::TABLE_NAME => "created_at_index");
     $c->addDescendingOrderByColumn(entryPeer::CREATED_AT);
     $c->add(entryPeer::TYPE, entryType::MEDIA_CLIP);
     // we don't want entries that
     //		$c->addJoin(entryPeer::KUSER_ID, kuserPeer::ID, Criteria::INNER_JOIN);
     //	    $c->addJoin(entryPeer::KSHOW_ID, kshowPeer::ID, Criteria::INNER_JOIN);
     $this->entries = entryPeer::doSelectJoinAll($c);
     $c = new Criteria();
     $this->bandsOnly($bands_only, $modified_band_ids, $c, kuserPeer::PARTNER_ID);
     $d = new Criteria();
     $this->bandsOnly($bands_only, $modified_band_ids, $d, kuserPeer::PARTNER_ID);
//.........这里部分代码省略.........
开发者ID:richhl,项目名称:kalturaCE,代码行数:101,代码来源:viewDashboardAction.class.php


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