Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button1_Click(object sender, EventArgs e)
- {
- string connect = "server=localhost;username=root;database=users;password=;";
- MySqlConnection connection = new MySqlConnection(connect);
- connection.Open();
- string zapros = "SELECT email FROM users.data WHERE email='" + textBox1.Text + "'";
- string updatepassword = "UPDATE `users`.`data` SET `password`='1122334455' WHERE `email`='" + textBox1.Text + "';";
- MySqlCommand command = new MySqlCommand(zapros, connection);
- MySqlCommand command1 = new MySqlCommand(updatepassword, connection);
- try
- {
- string resul = command.ExecuteScalar().ToString();
- string updpass = command1.ExecuteScalar().ToString();
- }
- catch (Exception ex)
- {
- MessageBox.Show("Такого нет!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement