Coba hapus '
dari kueri Anda dan gunakan Prepare
setelah menambahkan parameter:
cmd = new MySqlCommand("SELECT * FROM admin WHERE [email protected] AND admin_password=PASSWORD(@val2)", MySqlConn.conn);
cmd.Parameters.AddWithValue("@val1", tboxUserName.Text);
cmd.Parameters.AddWithValue("@val2", tboxPassword.Text);
cmd.Prepare();