using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using MySql.Data.MySqlClient; using System.Data; namespace grisviewgrouping { public partial class _Default : System.Web.UI.Page { MySqlConnection con = new MySqlConnection("Server=localhost;Database=projecttt;Uid=root;Pwd=xxxxxx;"); protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { con.Open(); MySqlCommand com = new MySqlCommand("select duration, toc from processeddata_table where dialdate BETWEEN ?sstart and ?sstop ", con); com.Parameters.Add("?sstart", MySqlDbType.Datetime).Value = TextBox1.Text; com.Parameters.Add("?sstop", MySqlDbType.Datetime).Value = TextBox2.Text; MySqlDataAdapter da = new MySqlDataAdapter(com); DataSet ds = new DataSet(); da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); con.Close(); } } }
select duration, toc from processeddata_table where dialdate BETWEEN ?sstart and ?sstop Group By toc
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)