protected function execHandle() { $stmt = $this->db->query('SELECT * FROM am_text AS t WHERE t.type_uid=? ORDER BY t.evt_create DESC', [!empty($_GET["typeUid"]) ? $_GET["typeUid"] : null]); $fetcher = new Zend_Db_Statement_Mysqli_Datemodifier($stmt, $this->getDateColumns()); $result = $fetcher->fetchAllWithDateModified(); $this->returnSuccess($result); }
protected function execHandle() { $stmt = $this->db->query('SELECT * FROM am_text AS t JOIN am_event AS e ON t.text_nr = e.text_nr WHERE t.type_uid=? AND DATE_ADD(e.evt_end,INTERVAL 1 DAY) >= NOW() ORDER BY e.evt_start LIMIT 1', [!empty($_GET["typeUid"]) ? $_GET["typeUid"] : null]); $fetcher = new Zend_Db_Statement_Mysqli_Datemodifier($stmt, $this->getDateColumns()); $result = $fetcher->fetchAllWithDateModified(); $this->returnSuccess($result); }
public function getRecord($id) { $select = $this->db->select(); $this->createReadFrom($select); $select->where($this->getConfiguredIdColumn() . " = ?", $id); $stmt = $select->query(); $fetcher = new Zend_Db_Statement_Mysqli_Datemodifier($stmt, $this->getConfiguredDateColumns()); $result = $fetcher->fetchAllWithDateModified(); return $result[0]; }