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


PHP Gpf_Data_RecordSet::load方法代码示例

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


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

示例1: getNumberOfSubaffiliates

    public function getNumberOfSubaffiliates($userid = null) {
        $result = new Gpf_Data_RecordSet();
        $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
        $selectBuilder->select->add('COUNT(u.userid)', 'amount');

        $selectBuilder->from->add(Pap_Db_Table_Users::getName(), "u");
        $selectBuilder->from->addInnerJoin(Gpf_Db_Table_Users::getName(), "gu", "u.accountuserid = gu.accountuserid");
        $selectBuilder->from->addInnerJoin(Gpf_Db_Table_AuthUsers::getName(), "au", "gu.authid = au.authid");

        $selectBuilder->where->add('u.deleted', '=', Gpf::NO);
        if ($userid === null) {
            $selectBuilder->where->add('u.parentuserid', '=', Gpf_Session::getAuthUser()->getPapUserId());
        } else {
            $selectBuilder->where->add('u.parentuserid', '=', $userid);
        }
        $selectBuilder->where->add('gu.rstatus', '<>', 'D');
        if ($this->params->isDateFromDefined()) {
            $selectBuilder->where->add('u.' . Pap_Stats_Table::DATEINSERTED, '>=', $this->params->getDateFrom()->toDateTime());
        }
        if ($this->params->isDateToDefined()) {
            $selectBuilder->where->add('u.' . Pap_Stats_Table::DATEINSERTED, '<=', $this->params->getDateTo()->toDateTime());
        }
        $selectBuilder->limit->set(0, 1);

        $result->load($selectBuilder);

        if($result->getSize() == 0) {
            return 0;
        }

        foreach($result as $record) {
            return $record->get('amount');
        }
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:34,代码来源:SubAffiliateStats.class.php

示例2: getCampaignRecordSetForAffiliate

    private function getCampaignRecordSetForAffiliate() {
        $selectBuilder = $this->createSelectBuilder();
        $selectBuilder->select->add('c.'.Pap_Db_Table_Campaigns::STATUS, 'rstatus');
        $selectBuilder->select->add('c.'.Pap_Db_Table_Campaigns::TYPE, 'rtype');
        Gpf_Plugins_Engine::extensionPoint('Pap_Common_Campaign_CampaignForAffiliateRichListBox.getCampaignRecordSetForAffiliate', 
        new Pap_Affiliates_Promo_SelectBuilderCompoundFilter($selectBuilder));

        $result = new Gpf_Data_RecordSet();
        $result->load($selectBuilder);
        
        return $result;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:12,代码来源:CampaignForAffiliateRichListBox.class.php

示例3: getAllPrivileges

 /**
  * @param string $roleId
  * @return Gpf_Data_RecordSet
  */
 public function getAllPrivileges($roleId)
 {
     $select = new Gpf_SqlBuilder_SelectBuilder();
     $select->select->add(self::ID, 'id');
     $select->select->add(self::OBJECT, 'object');
     $select->select->add(self::PRIVILEGE, 'privilege');
     $select->from->add(self::getName());
     $select->where->add(self::ROLE_ID, "=", $roleId);
     $privileges = new Gpf_Data_RecordSet();
     $privileges->load($select);
     return $privileges;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:16,代码来源:RolePrivileges.class.php

示例4: getAllWallpapers

 /**
  * @param String $viewtype
  *
  * @return Gpf_Data_RecordSet
  */
 public function getAllWallpapers()
 {
     $result = new Gpf_Data_RecordSet();
     $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
     $selectBuilder->select->add(self::ID, 'id');
     $selectBuilder->select->add(self::NAME, 'name');
     $selectBuilder->select->add(self::URL, 'url');
     $selectBuilder->select->add(self::FILEID, 'fileid');
     $selectBuilder->from->add(self::getName());
     $selectBuilder->where->add(self::ACCOUNTUSERID, '=', Gpf_Session::getAuthUser()->getAccountUserId());
     $result->load($selectBuilder);
     return $result;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:18,代码来源:Wallpapers.class.php

示例5: getAllCommissionTypeAttributes

    /**
     * @param String commissionTypeId
     *
     * @return Gpf_Data_RecordSet
     */
    public function getAllCommissionTypeAttributes($commissionTypeId) {
        $result = new Gpf_Data_RecordSet('id');

        $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
        $selectBuilder->select->add(self::ID, 'attributeid');
        $selectBuilder->select->add(self::COMMISSION_TYPE_ID, 'commtypeid');
        $selectBuilder->select->add(self::NAME, 'name');
        $selectBuilder->select->add(self::VALUE, 'value');
        $selectBuilder->from->add(self::getName());
        $selectBuilder->where->add(self::ID, '=', $commissionTypeId);

        $result->load($selectBuilder);
        return $result;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:19,代码来源:CommissionTypeAttributes.class.php

示例6: getAllViews

 /**
  * @param String $viewtype
  *
  * @return Gpf_Data_RecordSet
  */
 public function getAllViews($viewtype)
 {
     $result = new Gpf_Data_RecordSet('id');
     $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
     $selectBuilder->select->add(self::ID, 'id');
     $selectBuilder->select->add(self::NAME, self::NAME);
     $selectBuilder->select->add(self::ROWSPERPAGE, self::ROWSPERPAGE);
     $selectBuilder->select->add(self::ACCOUNTUSERID, self::ACCOUNTUSERID);
     $selectBuilder->from->add(self::getName());
     $selectBuilder->where->add(self::VIEWTYPE, '=', $viewtype);
     $condition = new Gpf_SqlBuilder_CompoundWhereCondition();
     $condition->add(self::ACCOUNTUSERID, '=', Gpf_Session::getAuthUser()->getAccountUserId(), 'OR');
     $condition->add(self::ACCOUNTUSERID, '=', '', 'OR');
     $selectBuilder->where->addCondition($condition);
     $selectBuilder->orderBy->add(self::ACCOUNTUSERID, false);
     $result->load($selectBuilder);
     return $result;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:23,代码来源:Views.class.php

示例7: loadAffiliateSettings

    private function loadAffiliateSettings() {
    	$selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
        $selectBuilder->select->add('code', 'code');
        $selectBuilder->select->add('value', 'value');

        $selectBuilder->from->add('wd_g_settings');

        $selectBuilder->where->add('code', 'LIKE', 'Aff_signup_%');
        $selectBuilder->where->add('code', '=', 'Aff_initial_min_payout', 'OR');

        $result = new Gpf_Data_RecordSet();
        $result->load($selectBuilder);

        $count = 0;
        foreach($result as $record) {
			$this->pap3AffSettings[$record->get('code')] = $record->get('value');
        	$count++;
        }
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:19,代码来源:TaskAffiliatesData.class.php

示例8: loadCampaigns

	private function loadCampaigns() {
        $result = new Gpf_Data_RecordSet('id');

        $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
        $selectBuilder->select->add(Pap_Db_Table_Campaigns::ID, 'id');
        $selectBuilder->select->add(Pap_Db_Table_Campaigns::NAME, 'name');
        $selectBuilder->select->add(Pap_Db_Table_Campaigns::STATUS, 'status');
        $selectBuilder->select->add(Pap_Db_Table_Campaigns::DESCRIPTION, 'description');
        $selectBuilder->select->add(Pap_Db_Table_Campaigns::LOGO_URL, 'logourl');
        
        $selectBuilder->from->add(Pap_Db_Table_Campaigns::getName());
        
        $selectBuilder->where->add(Pap_Db_Table_Campaigns::STATUS, 'IN', Pap_Affiliates_Promo_Campaigns::getCampaignAllowedStatuses());

        $selectBuilder->orderBy->add(Pap_Db_Table_Campaigns::ORDER);
        
        $result->load($selectBuilder);
        return $result;
	}
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:19,代码来源:Campaigns.class.php

示例9: fillViewColumns

 /**
  * @return Gpf_Data_IndexedRecordSet
  */
 public function fillViewColumns(Gpf_Data_IndexedRecordSet $allColumns, $viewid)
 {
     $viewColumns = new Gpf_Data_RecordSet();
     $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
     $selectBuilder->select->add('name', 'name');
     $selectBuilder->select->add('sorted', 'sorted');
     $selectBuilder->select->add('width', 'width');
     $selectBuilder->from->add(self::getName());
     $selectBuilder->where->add('viewid', '=', $viewid);
     $selectBuilder->orderBy->add('rorder');
     $viewColumns->load($selectBuilder);
     foreach ($viewColumns as $viewColumn) {
         try {
             $column = $allColumns->getRecord($viewColumn->get('name'));
             $column->set('sorted', $viewColumn->get('sorted'));
             $column->set('width', $viewColumn->get('width'));
             $column->set('visible', Gpf::YES);
         } catch (Exception $e) {
         }
     }
     return $allColumns;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:25,代码来源:ViewColumns.class.php

示例10: checkUserApprovedDirectLinks

    public function checkUserApprovedDirectLinks($userId) {
        $result = new Gpf_Data_RecordSet();
        $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
        $selectBuilder->select->add('COUNT('.Pap_Db_Table_DirectLinkUrls::ID.')', 'count');
        $selectBuilder->from->add(Pap_Db_Table_DirectLinkUrls::getName());
        $selectBuilder->where->add(Pap_Db_Table_DirectLinkUrls::USER_ID, '=', $userId);
        $selectBuilder->where->add(Pap_Db_Table_DirectLinkUrls::STATUS, '=', Pap_Common_Constants::STATUS_APPROVED);

        $result->load($selectBuilder);

        if($result->getSize() == 0) {
            return false;
        }

        foreach($result as $record) {
            if($record->get('count') > 0) {
                return true;
            }
            break;
        }

        return false;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:23,代码来源:DirectLinkUrl.class.php

示例11: regenerateDirectLinksFile

    public function regenerateDirectLinksFile() {
    	$rs = new Gpf_Data_RecordSet();
        $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
        $selectBuilder->select->add('userid', 'userid');
        $selectBuilder->select->add('url', 'url');
        $selectBuilder->select->add('channelid', 'channelid');
        $selectBuilder->select->add('campaignid', 'campaignid');
        $selectBuilder->select->add('bannerid', 'bannerid');
        $selectBuilder->from->add(Pap_Db_Table_DirectLinkUrls::getName()); 
       	$selectBuilder->where->add('rstatus', '=', Pap_Common_Constants::STATUS_APPROVED);
		$selectBuilder->orderBy->add(Pap_Db_Table_DirectLinkUrls::MATCHES, false);

        $rs->load($selectBuilder);

    	$this->createTemporaryFile();

    	foreach($rs as $record) {
    		$this->addUrl($record->get('userid'), $record->get('url'),
    						$record->get('channelid'),
    						$record->get('campaignid'),
    						$record->get('bannerid'));
    	}
    	$this->commitTemporaryFile();
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:24,代码来源:DirectLinksBase.class.php

示例12: checkUserIsInCampaign

    /**
     * checks if user is in campaign, if yes, it will return valid commissionGroupID,
     * otherwise it returns false
     *
     * @param string $userId
     * @return string or false
     */
    public function checkUserIsInCampaign($userId) {
        $result = new Gpf_Data_RecordSet();
        $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
        $selectBuilder->select->add('u.usercommgroupid', 'usercommgroupid');
        $selectBuilder->select->add('u.commissiongroupid', 'commissiongroupid');
        $selectBuilder->select->add('u.rstatus', 'rstatus');
        $selectBuilder->from->add('qu_pap_userincommissiongroup', 'u');
        $selectBuilder->from->addInnerJoin('qu_pap_commissiongroups', 'g',
            'u.commissiongroupid=g.commissiongroupid');

        $selectBuilder->where->add('g.campaignid', '=', $this->getId());
        $selectBuilder->where->add('u.userid', '=', $userId);
        $selectBuilder->limit->set(0, 1);

        $result->load($selectBuilder);

        if($result->getSize() == 0) {
            return false;
        }

        foreach($result as $record) {
            if($this->isUserCommissionGroupStatusAllowed($record->get('rstatus'))) {
                return $record->get('commissiongroupid');
            }
            break;
        }

        return false;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:36,代码来源:Campaign.class.php

示例13: getFilterNames

 /**
  * @param filterType
  * @service filter read
  */
 public function getFilterNames(Gpf_Rpc_Params $params)
 {
     $condition = new Gpf_SqlBuilder_CompoundWhereCondition();
     $condition->add('f.userid', '=', Gpf_Session::getAuthUser()->getUserId(), 'OR');
     $condition->add('f.userid', '=', null, 'OR');
     $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
     $selectBuilder->select->add('f.filterid', 'id');
     $selectBuilder->select->add('f.name', 'name');
     $selectBuilder->from->add(Gpf_Db_Table_Filters::getName(), 'f');
     $selectBuilder->where->add('f.filtertype', '=', $params->get('filterType'));
     $selectBuilder->where->addCondition($condition);
     $selectBuilder->orderBy->add('f.name');
     $response = new Gpf_Data_RecordSet();
     $response->load($selectBuilder);
     return $response;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:20,代码来源:Filters.class.php

示例14: getAllCommissionTypes

    /**
     * @param String $campaignId
     * @param String $commissionType
     * @return Gpf_Data_RecordSet
     */
    public function getAllCommissionTypes($campaignId = null, $commissionType = null) {
        $result = new Gpf_Data_RecordSet('id');

        $selectBuilder = $this->getAllCommissionTypesSelect($campaignId, $commissionType);

        $result->load($selectBuilder);
        return $result;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:13,代码来源:CommissionTypes.class.php

示例15: getNumberOfUsersFromSameIP

    public function getNumberOfUsersFromSameIP($ip, $periodInSeconds) {
        $select = new Gpf_SqlBuilder_SelectBuilder();

        $select->select->add("count(au.authid)", "count");
        $select->from->add(Pap_Db_Table_Users::getName(),'pu');
        $select->from->addInnerJoin(Gpf_Db_Table_Users::getName(),'qu','pu.'.Pap_Db_Table_Users::ACCOUNTUSERID.'=qu.'.Gpf_Db_Table_Users::ID);
        $select->from->addInnerJoin(Gpf_Db_Table_AuthUsers::getName(),'au','au.'.Gpf_Db_Table_AuthUsers::ID.'=qu.'.Gpf_Db_Table_Users::AUTHID. ' and qu.'.Gpf_Db_Table_Users::ROLEID."='".Pap_Application::DEFAULT_ROLE_AFFILIATE."'");
        $select->where->add('au.'.Gpf_Db_Table_AuthUsers::IP, "=", $ip);
        $dateFrom = new Gpf_DateTime();
        $dateFrom->addSecond(-1*$periodInSeconds);
        $select->where->add(Pap_Db_Table_Users::DATEINSERTED, ">", $dateFrom->toDateTime());

        $recordSet = new Gpf_Data_RecordSet();
        $recordSet->load($select);

        foreach($recordSet as $record) {
            return $record->get("count");
        }
        return 0;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:20,代码来源:User.class.php


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