本文整理汇总了PHP中Gpf_SqlBuilder_SelectBuilder::getAllRows方法的典型用法代码示例。如果您正苦于以下问题:PHP Gpf_SqlBuilder_SelectBuilder::getAllRows方法的具体用法?PHP Gpf_SqlBuilder_SelectBuilder::getAllRows怎么用?PHP Gpf_SqlBuilder_SelectBuilder::getAllRows使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gpf_SqlBuilder_SelectBuilder
的用法示例。
在下文中一共展示了Gpf_SqlBuilder_SelectBuilder::getAllRows方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAllCommissionGroups
/**
* @param String $campaignId
*
* @return Gpf_Data_RecordSet
*/
public function getAllCommissionGroups($campaignId) {
$selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
$selectBuilder->select->add(self::ID, 'commissiongroupid');
$selectBuilder->select->add(self::NAME, 'name');
$selectBuilder->select->add(self::IS_DEFAULT, 'isdefault');
$selectBuilder->from->add(self::getName());
$selectBuilder->where->add(self::CAMPAIGN_ID, '=', $campaignId);
return $selectBuilder->getAllRows();
}
示例2: getUserChannels
public static function getUserChannels($userId) {
$select = new Gpf_SqlBuilder_SelectBuilder();
$select->select->add(self::ID);
$select->select->add(self::NAME);
$select->select->add(self::VALUE);
$select->from->add(self::getName());
$select->where->add(self::USER_ID, "=", $userId);
return $select->getAllRows();
}
示例3: getMailAttachments
/**
* Return all mail attachments for given mail id
*
* @param int $mailId
* @return Gpf_Data_RecordSet
*/
public static function getMailAttachments($mailId)
{
$select = new Gpf_SqlBuilder_SelectBuilder();
$select->select->add('f.*');
$select->select->add('ma.is_included_image', 'is_included_image');
$select->from->add(Gpf_Db_Table_MailAttachments::getName(), 'ma');
$select->from->addInnerJoin(Gpf_Db_Table_Files::getName(), 'f', 'f.fileid=ma.fileid');
$select->where->add('mailid', '=', $mailId);
return $select->getAllRows();
}
示例4: getMatchingCampaignsRecordSet
/**
* @return Gpf_Data_RecordSet
*/
protected function getMatchingCampaignsRecordSet($productId) {
$selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
$selectBuilder->select->add(Pap_Db_Table_Campaigns::ID);
$selectBuilder->select->add(Pap_Db_Table_Campaigns::PRODUCT_ID);
$selectBuilder->from->add(Pap_Db_Table_Campaigns::getName());
$selectBuilder->where->add(Pap_Db_Table_Campaigns::PRODUCT_ID, 'REGEXP', '[,[:space:]]'.$productId.'[,[:space:]]', 'OR');
$selectBuilder->where->add(Pap_Db_Table_Campaigns::PRODUCT_ID, 'REGEXP', '^'.$productId.'$', 'OR');
$selectBuilder->where->add(Pap_Db_Table_Campaigns::PRODUCT_ID, 'REGEXP', '^'.$productId.'[,[:space:]]', 'OR');
$selectBuilder->where->add(Pap_Db_Table_Campaigns::PRODUCT_ID, 'REGEXP', '[,[:space:]]'.$productId.'$', 'OR');
return $selectBuilder->getAllRows();
}
示例5: __construct
public function __construct()
{
for ($i = 0; $i < 10; $i++) {
$this->groupId = substr(md5(uniqid(rand(), true)), 0, 16);
$selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
$selectBuilder->select->add(Gpf_Db_Table_QuickTasks::GROUPID);
$selectBuilder->from->add(Gpf_Db_Table_QuickTasks::getName());
$selectBuilder->where->add(Gpf_Db_Table_QuickTasks::GROUPID, '=', $this->groupId);
if ($selectBuilder->getAllRows()->getSize() == 0) {
break;
}
}
}
示例6: execute
public function execute() {
$templatesSelect = new Gpf_SqlBuilder_SelectBuilder();
$templatesSelect->select->addAll(Gpf_Db_Table_MailTemplates::getInstance());
$templatesSelect->from->add(Gpf_Db_Table_MailTemplates::getName());
$templatesSelect->where->add(Gpf_Db_Table_MailTemplates::CLASS_NAME, 'IN',
array('Pap_Mail_Reports_AffDailyReport', 'Pap_Mail_Reports_AffMonthlyReport', 'Pap_Mail_Reports_AffWeeklyReport'));
$t = new Gpf_Db_MailTemplate();
$templates = $t->loadCollectionFromRecordset($templatesSelect->getAllRows());
foreach ($templates as $template) {
$this->processTemplate($template);
}
}
示例7: getAllNoRpc
public function getAllNoRpc() {
$selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
$selectBuilder->select->add(self::ID, 'id');
$selectBuilder->select->add(self::CODE, 'code');
$selectBuilder->select->add(self::PARAMS, 'params');
$selectBuilder->select->add(self::TITLE, 'title');
$selectBuilder->select->add(self::ICON, 'icon');
$selectBuilder->select->add(self::DESCRIPTION, 'description');
$selectBuilder->select->add(self::SHOWHEADER, 'showheader');
$selectBuilder->from->add(self::getName());
return $this->replaceUserVariablesInParams($selectBuilder->getAllRows());
}
示例8: ping
/**
*
* @service
* @anonym
* @return Gpf_Rpc_Data
*/
public function ping(Gpf_Rpc_Params $params)
{
$sql = new Gpf_SqlBuilder_SelectBuilder();
$sql->select->addAll(Gpf_Db_Table_AuthUsers::getInstance());
$sql->from->add(Gpf_Db_Table_AuthUsers::getName());
$count = $sql->getAllRows()->getSize();
if ($count == 0) {
throw new Gpf_Exception($this->_('Ping failed'));
}
$data = new Gpf_Rpc_Data();
$data->setValue('status', 'OK');
return $data;
}
示例9: getPendingAffiliatesCount
public function getPendingAffiliatesCount() {
$select = new Gpf_SqlBuilder_SelectBuilder();
$select->select->add(Gpf_Db_Table_Users::ID);
$select->from->add(Gpf_Db_Table_Users::getName());
$select->where->add(Gpf_Db_Table_Users::STATUS, "=", self::PENDING);
$select->where->add(Gpf_Db_Table_Users::ROLEID, "=", Pap_Application::DEFAULT_ROLE_AFFILIATE);
Gpf_Plugins_Engine::extensionPoint('AffiliateNetwork.modifyWhere', new Gpf_Common_SelectBuilderCompoundRecord($select, new Gpf_Data_Record(array())));
$result = $select->getAllRows();
return $result->getSize();
}
示例10: getOnlineRolesCount
/**
* Return count of online users per role
*
* @service online_user read
* @param Gpf_Rpc_Params $params
*/
public function getOnlineRolesCount(Gpf_Rpc_Params $params)
{
$sql = new Gpf_SqlBuilder_SelectBuilder();
$sql->from->add(Gpf_Db_Table_Roles::getName(), 'r');
$sql->from->addInnerJoin(Gpf_Db_Table_Users::getName(), 'u', 'u.roleid=r.roleid');
$sql->from->addInnerJoin(Gpf_Db_Table_LoginsHistory::getName(), 'l', 'l.accountuserid=u.accountuserid');
$sql->select->add(Gpf_Db_Table_Roles::NAME, Gpf_Db_Table_Roles::NAME, 'r');
$sql->select->add('count(*)', 'usersCount');
$sql->where->add(Gpf_Db_Table_LoginsHistory::LOGOUT, 'is', 'NULL', 'AND', false);
$sql->where->add(Gpf_Db_Table_LoginsHistory::LAST_REQUEST, '>', "('" . $this->createDatabase()->getDateString() . "' - INTERVAL 1800 SECOND)", 'AND', false);
Gpf_Plugins_Engine::extensionPoint('Gpf_Report_OnlineUsersGadget.getOnlineRolesCount', $sql->where);
$sql->groupBy->add('r.' . Gpf_Db_Table_Roles::ID);
return $this->translateRoleNames($sql->getAllRows());
}
示例11: getFileContent
/**
* Return file content from database
*
* @param string $fileId
* @return string
*/
public static function getFileContent($fileId)
{
$select = new Gpf_SqlBuilder_SelectBuilder();
$select->select->add('content', 'content');
$select->from->add(Gpf_Db_Table_FileContents::getName());
$select->where->add('fileid', '=', $fileId);
$select->orderBy->add('contentid');
$resultSet = $select->getAllRows();
$content = '';
foreach ($resultSet as $result) {
$content .= $result->get('content');
}
return $content;
}
示例12: updateNullValidTo
private function updateNullValidTo() {
$select = new Gpf_SqlBuilder_SelectBuilder();
$select->select->add('campaignid');
$select->select->add('cookielifetime');
$select->from->add(Pap_Db_Table_Campaigns::getName());
$recordSet = $select->getAllRows();
foreach ($recordSet as $record) {
$campaign = new Pap_Common_Campaign();
$campaign->setId($record->get('campaignid'));
$campaign->setCookieLifetime($record->get('cookielifetime'));
$this->updateValidityFor($campaign);
}
}
示例13: execute
public function execute() {
$q = new Gpf_SqlBuilder_SelectBuilder();
$q->select->add('fixedcost');
$q->from->add(Pap_Db_Table_Transactions::getName());
$q->limit->set(0,1);
try {
$q->getAllRows();
return;
} catch(Exception $e) {
}
$db = Gpf_DbEngine_Database::getDatabase();
$db->execute("ALTER TABLE qu_pap_transactions ADD fixedcost FLOAT NOT NULL DEFAULT '0'");
}
示例14: isSetRow
private function isSetRow() {
$select = new Gpf_SqlBuilder_SelectBuilder();
$select->select->add(Pap_Db_Table_UserPayoutOptions::VALUE, "payoutDataValue");
$select->from->add(Pap_Db_Table_UserPayoutOptions::getName());
$select->where->add(Pap_Db_Table_Users::ID, "=", $this->get(Pap_Db_Table_Users::ID));
$select->where->add(Gpf_Db_Table_FormFields::ID, "=", $this->get(Gpf_Db_Table_FormFields::ID));
$recordSet = $select->getAllRows();
if ($recordSet->getSize() > 0) {
return true;
}
return false;
}
示例15: getUploadedFiles
/**
* Return list of files assigned to mail template
* @service mail_template read
* @param Gpf_Rpc_Params $params
* @return Gpf_Data_RecordSet
*/
public function getUploadedFiles(Gpf_Rpc_Params $params)
{
$templateId = $params->get("templateId");
$dbRow = $this->loadMailTemplate($templateId);
$sql = new Gpf_SqlBuilder_SelectBuilder();
$sql->select->add(Gpf_Db_Table_Files::ID, Gpf_Db_Table_Files::ID, 'f');
$sql->select->add(Gpf_Db_Table_Files::FILE_NAME);
$sql->select->add(Gpf_Db_Table_Files::FILE_TYPE);
$sql->select->add(Gpf_Db_Table_Files::FILE_SIZE);
$sql->select->add(Gpf_Db_Table_MailTemplateAttachments::IS_INCLUDED_IMAGE);
$sql->from->add(Gpf_Db_Table_MailTemplateAttachments::getName(), 'ma');
$sql->from->addInnerJoin(Gpf_Db_Table_Files::getName(), 'f', 'f.fileid=ma.fileid');
$sql->where->add(Gpf_Db_Table_MailTemplates::ID, '=', $templateId);
return $sql->getAllRows();
}