public function indexAction() { $xml = new Application_Model_DbTable_Lote(); $select = $xml->select(); $select->where('status = ? ', 1); $this->view->xml = $xml->fetchall($select); }
public function paginacaoAction() { $xml = new Application_Model_DbTable_Lote(); $select = $xml->select(); $select->setIntegrityCheck(false); $select->from(array('l' => 'lote'), array('*'))->join(array('e' => 'empresa'), 'l.idLogin = e.id', array('*'))->where('status = ? ', 1); //$this->view->xml = $xml->fetchall($select); $tab = $xml->fetchall($select); //PEGANDO TODOS OS DADOS AQUI JA PASSO LINKS DE GERAR XML E PDF foreach ($tab as $id => $row) { $rows[] = array($row['AutoId'], $row['contrato'], $row['status'], $this->dataPhp($row['dt_lote']), '/xml/gerar/' . $row['AutoId'], '/pdf/xml/lote/' . $row['AutoId'] . '/contrato/' . $row['contrato']); } //ESCREVENDO JSON $this->view->json = json_encode($rows); //echo json_encode($rows); //exit; }