/** * Update row using model data * * @param string $condition Conditional for WHERE statement * @param array $data Array of data to update row with * @return mixed */ public function updateRow($condition, $data = array()) { if (empty($data)) { $data = $this->getRow(); } return $this->db->update($this->table, $data, $condition); }
/** * Do things to close down the app on shutdown */ function shutdown() { $db = \GreenMvc\Db\Db::getInstance(); $db->close(); if (DEBUG && IS_CLI) { echo "[0;31mk[1;33mt[0;32mh[0;34mn[0;35mx[1;31mb[1;33my[1;32me[0m" . PHP_EOL; } }