コード例 #1
0
ファイル: Impression.php プロジェクト: AmineCherrai/rostanvo
 protected function initStatsSelect(Gpf_SqlBuilder_SelectClause $select)
 {
     $select->add('sum(' . self::RAW . ')', self::RAW);
     $select->add('sum(' . self::UNIQUE . ')', self::UNIQUE);
 }
コード例 #2
0
ファイル: Core.php プロジェクト: AmineCherrai/rostanvo
 public function equals(Gpf_SqlBuilder_SelectClause $select)
 {
     return $select->toString() == $this->toString();
 }
コード例 #3
0
    /**
     * @return String
     */
    protected function createChannelsWithEmptyRow(Gpf_SqlBuilder_SelectBuilder $select) {
        $selectNullRow = new Gpf_SqlBuilder_SelectClause();
        $selectNullRow->add('\'\'', Pap_Db_Table_Channels::ID);
        $selectNullRow->add('\' ' . $this->_('None channel') . '\'', Pap_Db_Table_Channels::NAME);

        return $select->toString() . ' UNION ' . $selectNullRow->toString();
    }
コード例 #4
0
 public function initSelectClause(Gpf_SqlBuilder_SelectClause $select) {
     $select->replaceColumn('cnt', 'count(distinct(t.'.Pap_Db_Table_Transactions::SALE_ID.'))', 'cnt');
     $select->replaceColumn('totalcost', 'MAX(t.'.Pap_Db_Table_Transactions::TOTAL_COST.')', 'totalcost');
 }
コード例 #5
0
 public function toString()
 {
     return $this->select->toString() . ($this->from->isEmpty() ? '' : "FROM " . $this->from->toString()) . $this->where->toString() . $this->groupBy->toString() . $this->having->toString() . $this->orderBy->toString() . $this->limit->toString();
 }