I am trying to find the sum of a column( cal) between two dates and then assign or display the result (sum) in a textbox or label in C#. Please help me.
MySqlConnection mycon = new MySqlConnection("datasource=localhost;username=root;database=church");
mycon.Open();
MySqlCommand get = new MySqlCommand("SELECT sum(cal) from tithes where transdate between '" + from + "' and '" + to + "'");
MySqlDataReader reade = get.ExecuteReader();
label4.Text = reade.ToString();
mycon.Close();