Пример #1
0
 /**
  * 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);
 }
Пример #2
0
/**
 * Do things to close down the app on shutdown
 */
function shutdown()
{
    $db = \GreenMvc\Db\Db::getInstance();
    $db->close();
    if (DEBUG && IS_CLI) {
        echo "kthnxbye" . PHP_EOL;
    }
}