Exemplo n.º 1
0
 /**
  * Build the query array
  *
  * @return Tx_Recordsmanager_Utility_Query
  */
 public function buildQuery()
 {
     $arguments = $this->request->getArguments();
     $queryObject = new \Sng\Recordsmanager\Utility\Query();
     $queryObject->setConfig($this->currentConfig);
     $queryObject->buildQuery();
     if (!empty($arguments['orderby'])) {
         $queryObject->setOrderBy(rawurldecode($arguments['orderby']));
     }
     return $queryObject;
 }
Exemplo n.º 2
0
 /**
  * Build the query array
  *
  * @return \Sng\Recordsmanager\Utility\Query
  */
 public function buildQuery()
 {
     $arguments = $this->request->getArguments();
     $filterField = 'tstamp';
     if (empty($row['exportfilterfield']) !== true) {
         $filterField = $this->currentConfig['exportfilterfield'];
     }
     $queryObject = new \Sng\Recordsmanager\Utility\Query();
     $queryObject->setConfig($this->currentConfig);
     $queryObject->buildQuery();
     if (!empty($arguments['orderby'])) {
         $queryObject->setOrderBy(rawurldecode($arguments['orderby']));
     }
     if (!empty($arguments['startdate'])) {
         list($day, $month, $year) = explode('-', $arguments['startdate']);
         $tstamp = mktime(0, 0, 0, $month, $day, $year);
         $queryObject->setWhere($queryObject->getWhere() . ' AND ' . $this->currentConfig['sqltable'] . '.' . $filterField . '>=' . $tstamp);
     }
     if (!empty($arguments['enddate'])) {
         list($day, $month, $year) = explode('-', $arguments['enddate']);
         $tstamp = mktime(0, 0, 0, $month, $day, $year);
         $queryObject->setWhere($queryObject->getWhere() . ' AND ' . $this->currentConfig['sqltable'] . '.' . $filterField . '<=' . $tstamp);
     }
     return $queryObject;
 }
Exemplo n.º 3
0
 /**
  * Build the query array
  *
  * @return \Sng\Recordsmanager\Utility\Query
  */
 public function buildQuery()
 {
     $queryObject = new \Sng\Recordsmanager\Utility\Query();
     $queryObject->setConfig($this->currentConfig);
     $queryObject->setExportMode(true);
     $queryObject->buildQuery();
     return $queryObject;
 }