public function ExeStatus($PostId, $PostStatus) { $this->Post = (int) $PostId; $this->Data['post_status'] = (string) $PostStatus; $Read = new Read('ws_posts'); $this->Data['post_id'] = $this->Post; $Read->update($this->Data); }
function handle_update() { $read = new Read(intval($_POST['id'])); if ($read->is_valid) { $read['status'] = $_POST['status']; if ($read->update()) { $title_author = '<b>' . $read['title'] . '</b> by ' . $read['author']; notice("Status updated sucessfully for {$title_author}."); } else { error("An error occured updating {$title_author}"); } } }
function handle_create() { $read = new Read(intval($_POST['read_id'])); if ($read->is_valid) { $params = array('notes' => $_POST['content']); if ($read->update($params)) { notice('Updated!'); } else { error_log('update failed'); } } else { error('No Read by that id.'); } }
/** * <b>Ativa/Inativa Empresa:</b> Informe o ID da empresa e o status e um status sendo 1 para ativo e 0 para * rascunho. Esse méto ativa e inativa as empresas! * @param INT $PostId = Id do post * @param STRING $PostStatus = 1 para ativo, 0 para inativo */ public function ExeStatus($EmpresaId, $EmpresaStatus) { $this->Empresa = (int) $EmpresaId; $this->Data['empresa_status'] = (string) $EmpresaStatus; $this->Data['empresa_id'] = $this->Empresa; $Update = new Read('app_empresas'); $Update->update($this->Data, "empresa_id = :empresa_id"); }
public function update($Termos = null) { return $this->Read->update($this->Dados, $Termos); }