当前位置: 首页>>代码示例>>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;未经允许,请勿转载。