Example #1
0
        public DataTable SelectByDateTime(DateTime dateTime)
        {
            String    sql       = "SELECT * FROM tb_plane_kingdata where `DateTime`=\"" + dateTime.ToString("yyyy-MM-dd HH:mm:ss") + "\";";
            DataTable dataTable = MySqlDatabaseUtil.ExecuteQuery(sql);

            return(dataTable);
        }
Example #2
0
        public DataTable SelectByID(long id)
        {
            String    sql       = "SELECT * FROM tb_plane_kingdata where `id`=" + id;
            DataTable dataTable = MySqlDatabaseUtil.ExecuteQuery(sql);

            return(dataTable);
        }
Example #3
0
        //不建议使用
        public DataTable SelectAll()
        {
            String    sql       = "SELECT * FROM tb_plane_kingdata;";
            DataTable dataTable = MySqlDatabaseUtil.ExecuteQuery(sql);

            return(dataTable);
        }
Example #4
0
        public DataTable SelectByLimit(int start, int count)
        {
            String sql = String.Format("SELECT * FROM tb_plane_kingdata LIMIT {0},{1}", start, count);

            DataTable dataTable = MySqlDatabaseUtil.ExecuteQuery(sql);

            return(dataTable);
        }
Example #5
0
        public DataTable CustomQuery(string sql)
        {
            DataTable dataTable = MySqlDatabaseUtil.ExecuteQuery(sql);

            return(dataTable);
        }