public function update(array $data, $where)
{
$tableSpec = ($this->_schema ? $this->_schema . '.' : '') . $this->_name;
return $this->_db->update($tableSpec, $data, $where);
}
public function update($id, $state, $info) { $data = array('state' => $state, 'info' => $info, 'lastupdate' => time()); $found = $this->find($id); if ($found) { $data = array_merge($found, $data); unset($data['id']); $this->dbTable->update($data, array('id = ?' => $id)); } else { $data['id'] = $id; $data['sticked'] = 0; $this->dbTable->insert($data); } }