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


PHP StatementBuilder::OrderBy方法代码示例

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


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

示例1: getAllOrder

 public function getAllOrder()
 {
     // Get the OrderService.
     $orderService = $this->dfp_user->GetService('OrderService', 'v201508');
     // Create a statement to select all orders.
     $statementBuilder = new StatementBuilder();
     $statementBuilder->OrderBy('id ASC')->Limit(StatementBuilder::SUGGESTED_PAGE_LIMIT);
     // Get orders by statement.
     $page = $orderService->getOrdersByStatement($statementBuilder->ToStatement());
     // Display results.
     if (isset($page->results)) {
         return $page->results;
     }
 }
开发者ID:cyberorca,项目名称:dfp-api,代码行数:14,代码来源:dfp_order_model.php

示例2: syncDFPAPIplacement

 public function syncDFPAPIplacement()
 {
     // Get the PlacementService.
     $placementService = $this->dfp_user->GetService('PlacementService', 'v201508');
     // Create a statement to select all placements.
     $statementBuilder = new StatementBuilder();
     $statementBuilder->OrderBy('id ASC')->Limit(StatementBuilder::SUGGESTED_PAGE_LIMIT);
     // Get placements by statement.
     $page = $placementService->getPlacementsByStatement($statementBuilder->ToStatement());
     // Display results.
     if (isset($page->results)) {
         foreach ($page->results as $placement) {
             $data[] = array($placement->id, $placement->name);
         }
     }
     $field = array('dp_id', 'dp_name');
     return $this->insert($this->table, $data, $field);
 }
开发者ID:cyberorca,项目名称:dfp-api,代码行数:18,代码来源:dfp_placement_model.php

示例3: dirname

$path = dirname(__FILE__) . '/../../../../src';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once 'Google/Api/Ads/Dfp/Lib/DfpUser.php';
require_once 'Google/Api/Ads/Dfp/Util/v201408/StatementBuilder.php';
require_once dirname(__FILE__) . '/../../../Common/ExampleUtils.php';
try {
    // Get DfpUser from credentials in "../auth.ini"
    // relative to the DfpUser.php file's directory.
    $user = new DfpUser();
    // Log SOAP XML request and response.
    $user->LogDefaults();
    // Get the ContentService.
    $contentService = $user->GetService('ContentService', 'v201408');
    // Create a statement to select all content.
    $statementBuilder = new StatementBuilder();
    $statementBuilder->OrderBy('id ASC')->Limit(StatementBuilder::SUGGESTED_PAGE_LIMIT);
    // Default for total result set size.
    $totalResultSetSize = 0;
    do {
        // Get content by statement.
        $page = $contentService->getContentByStatement($statementBuilder->ToStatement());
        // Display results.
        if (isset($page->results)) {
            $totalResultSetSize = $page->totalResultSetSize;
            $i = $page->startIndex;
            foreach ($page->results as $content) {
                printf("%d) Content with ID %d, name '%s', and status %s was found.\n", $i++, $content->id, $content->name, $content->status);
            }
        }
        $statementBuilder->IncreaseOffsetBy(StatementBuilder::SUGGESTED_PAGE_LIMIT);
    } while ($statementBuilder->GetOffset() < $totalResultSetSize);
开发者ID:rochmit10,项目名称:googleads-php-lib,代码行数:31,代码来源:GetAllContent.php

示例4: dirname

$path = dirname(__FILE__) . '/../../../../src';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once 'Google/Api/Ads/Dfp/Lib/DfpUser.php';
require_once 'Google/Api/Ads/Dfp/Util/v201602/StatementBuilder.php';
require_once dirname(__FILE__) . '/../../../Common/ExampleUtils.php';
try {
    // Get DfpUser from credentials in "../auth.ini"
    // relative to the DfpUser.php file's directory.
    $user = new DfpUser();
    // Log SOAP XML request and response.
    $user->LogDefaults();
    // Get the LineItemCreativeAssociationService.
    $licaService = $user->GetService('LineItemCreativeAssociationService', 'v201602');
    // Create a statement to select all LICAs.
    $statementBuilder = new StatementBuilder();
    $statementBuilder->OrderBy('lineItemId ASC, creativeId ASC')->Limit(StatementBuilder::SUGGESTED_PAGE_LIMIT);
    // Default for total result set size.
    $totalResultSetSize = 0;
    do {
        // Get LICAs by statement.
        $page = $licaService->getLineItemCreativeAssociationsByStatement($statementBuilder->ToStatement());
        // Display results.
        if (isset($page->results)) {
            $totalResultSetSize = $page->totalResultSetSize;
            $i = $page->startIndex;
            foreach ($page->results as $lica) {
                if (isset($lica->creativeSetId)) {
                    printf("%d) LICA with line item ID %d, and creative set ID %d was " . "found.\n", $i++, $lica->lineItemId, $lica->creativeSetId);
                } else {
                    printf("%d) LICA with line item ID %d, and creative ID %d was " . "found.\n", $i++, $lica->lineItemId, $lica->creativeId);
                }
开发者ID:googleads,项目名称:googleads-php-lib,代码行数:31,代码来源:GetAllLicas.php

示例5: dirname

$path = dirname(__FILE__) . '/../../../../src';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once 'Google/Api/Ads/Dfp/Lib/DfpUser.php';
require_once 'Google/Api/Ads/Dfp/Util/v201608/StatementBuilder.php';
require_once dirname(__FILE__) . '/../../../Common/ExampleUtils.php';
try {
    // Get DfpUser from credentials in "../auth.ini"
    // relative to the DfpUser.php file's directory.
    $user = new DfpUser();
    // Log SOAP XML request and response.
    $user->LogDefaults();
    // Get the UserTeamAssociationService.
    $userTeamAssociationService = $user->GetService('UserTeamAssociationService', 'v201608');
    // Create a statement to select all user team associations.
    $statementBuilder = new StatementBuilder();
    $statementBuilder->OrderBy('teamId ASC, userId ASC')->Limit(StatementBuilder::SUGGESTED_PAGE_LIMIT);
    // Default for total result set size.
    $totalResultSetSize = 0;
    do {
        // Get user team associations by statement.
        $page = $userTeamAssociationService->getUserTeamAssociationsByStatement($statementBuilder->ToStatement());
        // Display results.
        if (isset($page->results)) {
            $totalResultSetSize = $page->totalResultSetSize;
            $i = $page->startIndex;
            foreach ($page->results as $userTeamAssociation) {
                printf("%d) User team association between user with ID %d, and team " . "with ID %d was found.\n", $i++, $userTeamAssociation->userId, $userTeamAssociation->teamId);
            }
        }
        $statementBuilder->IncreaseOffsetBy(StatementBuilder::SUGGESTED_PAGE_LIMIT);
    } while ($statementBuilder->GetOffset() < $totalResultSetSize);
开发者ID:googleads,项目名称:googleads-php-lib,代码行数:31,代码来源:GetAllUserTeamAssociations.php

示例6: getAllCustomTargetingKeyIds

/**
 * Gets all custom targeting key IDs.
 */
function getAllCustomTargetingKeyIds($user)
{
    $customTargetingKeyIds = array();
    // Get the CustomTargetingService.
    $customTargetingService = $user->GetService('CustomTargetingService', 'v201502');
    // Create a statement to get all custom targeting keys.
    $statementBuilder = new StatementBuilder();
    $statementBuilder->OrderBy('id ASC')->Limit(StatementBuilder::SUGGESTED_PAGE_LIMIT);
    // Default for total result set size.
    $totalResultSetSize = 0;
    do {
        // Get custom targeting keys by statement.
        $page = $customTargetingService->getCustomTargetingKeysByStatement($statementBuilder->ToStatement());
        // Display results.
        if (isset($page->results)) {
            $totalResultSetSize = $page->totalResultSetSize;
            $i = $page->startIndex;
            foreach ($page->results as $customTargetingKey) {
                printf("%d) Custom targeting key with ID %d, name '%s', and display " . "name '%s' was found.\n", $i++, $customTargetingKey->id, $customTargetingKey->name, $customTargetingKey->displayName);
                $customTargetingKeyIds[] = $customTargetingKey->id;
            }
        }
        $statementBuilder->IncreaseOffsetBy(StatementBuilder::SUGGESTED_PAGE_LIMIT);
    } while ($statementBuilder->GetOffset() < $totalResultSetSize);
    return $customTargetingKeyIds;
}
开发者ID:stevenmaguire,项目名称:googleads-php-lib,代码行数:29,代码来源:GetAllCustomTargetingKeysAndValues.php


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