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


PHP Gpf_SqlBuilder_SelectBuilder::cloneObj方法代碼示例

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


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

示例1: getStatsSelect

 public function getStatsSelect(Pap_Stats_StatsSelectContext $statsSelectContext) {
     if ($statsSelectContext->getGroupColumn() == Pap_Db_Table_Banners::ID) {
         $select = new Gpf_SqlBuilder_SelectBuilder();
         $select->cloneObj($statsSelectContext->getSelectBuilder());
         $select->select->replaceColumn($statsSelectContext->getGroupColumnAlias(), Pap_Db_Table_BannersInRotators::PARENT_BANNER_ID, $statsSelectContext->getGroupColumnAlias());
         $select->groupBy->removeByName(Pap_Db_Table_Banners::ID);
         $select->groupBy->add(Pap_Db_Table_BannersInRotators::PARENT_BANNER_ID);
         $statsSelectContext->getUnionBuilder()->addSelect($select);
     }
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:10,代碼來源:Main.class.php

示例2: processResult

    public function processResult(Gpf_SqlBuilder_SelectBuilder $selectBuilder) {
        $innerSelect = new Gpf_SqlBuilder_SelectBuilder();
        $innerSelect->cloneObj($selectBuilder);

        $selectBuilder->select = new Gpf_SqlBuilder_SelectClause();
        $selectBuilder->from = new Gpf_SqlBuilder_FromClause();
        $selectBuilder->where = new Gpf_SqlBuilder_WhereClause();
        $selectBuilder->groupBy = new Gpf_SqlBuilder_GroupByClause();
        $selectBuilder->orderBy = new Gpf_SqlBuilder_OrderByClause();
        $selectBuilder->limit = new Gpf_SqlBuilder_LimitClause();
        $selectBuilder->having = new Gpf_SqlBuilder_HavingClause();

        $selectBuilder->select->add("s.status");
        $selectBuilder->select->add("s.payoutstatus");
        $selectBuilder->select->add("sum(s.cnt)", "cnt");
        $selectBuilder->select->add("sum(s.commission)", "commission");
        $selectBuilder->select->add("sum(s.totalcost)", "totalcost");
        $selectBuilder->from->addSubselect($innerSelect, 's');
        $selectBuilder->groupBy->add("s.status");
        $selectBuilder->groupBy->add("s.payoutstatus");
    }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:21,代碼來源:SplitCommissions.class.php

示例3: doMossoHack

    /**
     * HACK: mosso MySQL servers can not handle large result sets so the select has to be splitted
     */
    protected function doMossoHack(Gpf_DbEngine_Table $primaryTable, $primaryTableAlias, $primaryColumnName) {
        $orderSelect = new Gpf_SqlBuilder_SelectBuilder();
        $orderSelect->cloneObj($this->_selectBuilder);
        $orderSelect->select = new Gpf_SqlBuilder_SelectClause();
        $orderSelect->select->add($primaryTableAlias.'.'.$primaryColumnName, 'idCol');
        foreach ($orderSelect->orderBy->getAllOrderColumns() as $orderColumns) {
            $dataColumn = $this->dataColumns[$orderColumns->getName()];
            $orderSelect->select->add($dataColumn->getName(), $dataColumn->getId());
        }

        $this->_selectBuilder->from = new Gpf_SqlBuilder_FromClause();
        $this->_selectBuilder->from->addSubselect($orderSelect, 'ors');
        $this->_selectBuilder->from->addInnerJoin($primaryTable->name(), $primaryTableAlias,
        $primaryTableAlias.'.'.$primaryColumnName.'=ors.idCol');
        $i = 0;
        foreach ($orderSelect->from->getAllFroms() as $fromClause) {
            if ($i++ == 0) {
                continue;
            }
            $this->_selectBuilder->from->addClause($fromClause);
        }
        $this->_selectBuilder->limit = new Gpf_SqlBuilder_LimitClause();
    }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:26,代碼來源:GridService.class.php

示例4: computeCount

	protected function computeCount() {
		$countSelect = new Gpf_SqlBuilder_SelectBuilder();
		$countSelect->cloneObj($this->rawClicksSelect);
		$countSelect->select = new Gpf_SqlBuilder_SelectClause();
		$countSelect->select->add('count(*)', 'count');
		$countSelect->orderBy = new Gpf_SqlBuilder_OrderByClause();
		$this->_count = $countSelect->getOneRow()->get('count');
	}
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:8,代碼來源:ClicksGrid.class.php


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