コード例 #1
0
ファイル: Impression.php プロジェクト: AmineCherrai/rostanvo
 /**	 
  * @return Gpf_SqlBuilder_SelectBuilder
  */
 private function createSubSelect()
 {
     $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
     $selectBuilder->from->add(Pap_Db_Table_RawImpressions::getName($this->processedTableIndex));
     $dateColumn = 'DATE_FORMAT(' . Pap_Db_Table_RawImpressions::DATE . ', "%Y-%m-%d %H:00:00")';
     $selectBuilder->select->add(Pap_Db_Table_RawImpressions::ID);
     $selectBuilder->select->add($dateColumn, 'date');
     $selectBuilder->select->add(Pap_Db_Table_RawImpressions::RTYPE);
     $selectBuilder->select->add(Pap_Db_Table_RawImpressions::USERID);
     $selectBuilder->select->add(Pap_Db_Table_RawImpressions::BANNERID);
     $selectBuilder->select->add(Pap_Db_Table_RawImpressions::PARENTBANNERID);
     $selectBuilder->select->add(Pap_Db_Table_RawImpressions::CHANNEL);
     $selectBuilder->select->add(Pap_Db_Table_RawImpressions::IP);
     $selectBuilder->select->add(Pap_Db_Table_RawImpressions::DATA1);
     $selectBuilder->select->add(Pap_Db_Table_RawImpressions::DATA2);
     $selectBuilder->where->add(Pap_Db_Table_RawImpressions::RSTATUS, '=', Pap_Db_RawImpression::UNPROCESSED);
     $selectBuilder->limit->set(0, self::ROWS_FOR_PROCESSING_LIMIT);
     return $selectBuilder;
 }
コード例 #2
0
 protected function init() {
     $this->setTable(Pap_Db_Table_RawImpressions::getInstance($this->index));
     parent::init();
 }