I need to get from each individual table but from the same column name the value to a string array
. Although I don't what I table names I've got. I only know they all have a column name 'email'.
string connectionString = "SERVER=********;PORT=****;DATABASE=********;UID=********;PASSWORD=******;";
MySqlConnection conn = new MySqlConnection(connectionString);
MySqlCommand command = conn.CreateCommand();
try
{
conn.Open();
command.CommandText = "SHOW FULL TABLES FROM ExampleDataBase";
}
catch
{
MessageBox.Show("error");
}
MySqlDataReader reader;
reader = command.ExecuteReader();
while (reader.Read())
{
string usermail = reader.GetString("email");
string[] mail = new String[] { usermail};
foreach (string s in mail)
{
listboxMails.Items.Add("email: " + s)
}
}