public function change_pwd($pwd) { $sth = $this->dblink->prepare("UPDATE event SET value = ? WHERE name = 'master'"); $hashed_pwd = blowfish($pwd); $sth->bindParam(1, $hashed_pwd, PDO::PARAM_STR); $this->write_sql($sth); }
public function change_pwd($post) { if ($post['password'] === (string) "") { throw new Exception("パスワードは入力必須です"); } $hashed_pwd = blowfish($post['password']); $sth = $this->dblink->prepare("UPDATE info SET password = ? WHERE rowid = ?"); $sth->bindParam(1, $hashed_pwd, PDO::PARAM_STR); $sth->bindParam(2, $post['entry_no'], PDO::PARAM_INT); $this->write_sql($sth); }