for some reason the following C# code doesn't work:
int id = 1293842;
connect.Open();
string getInfoQuery = "SELECT * FROM table WHERE id = @idpara";
MySqlCommand getInfo = new MySqlCommand(getInfoQuery, connect);
getInfo.Parameters.AddWithValue("@idpara", id);
string username = "test";
MySqlDataReader dataGet = getInfo.ExecuteReader();
while (dataGet.Read()) {
username = dataGet.GetString("username");
}
MessageBox.Show(username);
The MessageBox doesn't display the username I look for, but 'test', the value I used for the declaration of my string.
Help is appreciated!