connection = new MySqlConnection(connectionString); Query = "SELECT status FROM Accounts WHERE username=@username"; connection = new MySqlConnection(connectionString); MySqlCommand command = new MySqlCommand(Query, connection); command.CommandType = System.Data.CommandType.Text; command.Parameters.AddWithValue("@username", thedesiredusername); connection.Open(); MySqlDataReader dataReader = command.ExecuteReader(); while (dataReader.Read()) { string userstatus = dataReader.GetString("status"); }
connection = new MySqlConnection(connectionString); Query = "SELECT status FROM Accounts WHERE username=@username"; connection = new MySqlConnection(connectionString); MySqlCommand command = new MySqlCommand(Query, connection); command.CommandType = System.Data.CommandType.Text; command.Parameters.AddWithValue("@username", thedesiredusername); connection.Open(); MySqlDataReader dataReader = command.ExecuteReader(); while (dataReader.Read()) { //keep doing: if (userstatus != dataReader.GetString("status")) { string userstatus = dataReader.GetString("status"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)