示例#1
0
 public function compatibleExec(CDBResult $result, $navStart)
 {
     if ($this->aggregated) {
         $result->addFetchAdapter(new AggregateAdapter($this->aggregated));
     }
     if (is_array($navStart) && isset($navStart['nTopCount'])) {
         if ($navStart['nTopCount'] > 0) {
             $this->setLimit($navStart['nTopCount']);
         } else {
             $result->compatibleNavQuery($this, $navStart);
             return $result;
         }
     }
     $rows = $this->exec()->fetchAll();
     $result->InitFromArray($rows);
     return $result;
 }
示例#2
0
 public function compatibleExec(CDBResult $result, $navStart)
 {
     if ($this->aggregated) {
         $result->addFetchAdapter(new AggregateAdapter($this->aggregated));
     }
     if (is_array($navStart) && isset($navStart['nTopCount'])) {
         if ($navStart['nTopCount'] > 0) {
             $this->setLimit($navStart['nTopCount']);
         } else {
             $result->compatibleNavQuery($this, $navStart);
             return $result;
         }
     }
     // Do not remove!!!
     //		file_put_contents('/var/www/log', "\n\n\n\n".$this->getQuery()."\n", FILE_APPEND); // $this->dump()
     $rows = $this->exec()->fetchAll();
     // Do not remove!!!
     //		foreach ($rows as $row)
     //		{
     //			file_put_contents('/var/www/log', "\n".print_r($row, true), FILE_APPEND);
     //		}
     $result->InitFromArray($rows);
     // Do not remove!!!
     //		while ($row = $result->Fetch())
     //		{
     //			file_put_contents('/var/www/log', "\n".print_r($row, true), FILE_APPEND);
     //		}
     return $result;
 }