C# MySql Select
MySqlCommand objCmd = new MySqlCommand("select * from `main_db`.`t_realdailyinfo` ", objConn);
MySqlCommand objCmd = new MySqlCommand("select * from `main_db`.`t_user` where SysNo = 1 ", objConn);
MySqlCommand objCmd = new MySqlCommand("select UserName from `main_db`.`t_user` where SysNo = 2 ", objConn);
// UserName ,SysNo 均为column名称
MySqlDataReader r = objCmd.ExecuteReader();
while (r.Read())
{
//FieldCount为这个表中有多少的列 column
int i = r.FieldCount;
textBox3.Text = i.ToString();
}