Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # PRIMEIRA COISA
- ## SE NÃO É PRA MEXER EM SENHA, NÃO COLOCA SENHA NA QUERY
- public function update($id){
- $sql = "UPDATE $this->table
- SET
- tipo = :tipo, nome = :nome, email = :email,
- cpf_cnpj = :cpf_cnpj, telefone = :telefone
- WHERE
- id = :id
- ";
- $stmt = DB::prepare($sql);
- $stmt->bindParam(':tipo', $this->tipo);
- $stmt->bindParam(':nome', $this->nome);
- $stmt->bindParam(':email', $this->email);
- $stmt->bindParam(':cpf_cnpj', $this->cpf_cnpj);
- $stmt->bindParam(':telefone', $this->telefone);
- $stmt->bindParam(':id', $id);
- return $stmt->execute();
- }
Advertisement
Add Comment
Please, Sign In to add comment