Beispiel #1
0
        private string makeSql1()
        {
            string sql = "select ";

            for (int i = 0; i < configM.List.Count; i++)
            {
                DBConfigItem item = configM.List[i];
                sql += item.Dbfld + " as " + item.ApiKey;
                if (i < configM.List.Count - 1)
                {
                    sql += ",";
                }
            }
            string from  = " from " + configM.TbName;
            string rsql1 = sql + from;

            return(rsql1);
        }
Beispiel #2
0
        private string makeSql()
        {
            string sql = "select ";

            for (int i = 0; i < configM.List.Count; i++)
            {
                DBConfigItem item = configM.List[i];
                sql += item.Dbfld + " as " + item.ApiKey;
                if (i < configM.List.Count - 1)
                {
                    sql += ",";
                }
            }
            string from = " from " + configM.TbName;

            string where = " where " + configM.Timefld + ">='{0}' and " + configM.Timefld + "<'{1}'";
            rsql         = sql + from + where;
            return(rsql);
        }