protected void ParseSelectQuery() { string w = "", o = "", f = "", tb, s; tb = FormatFieldName(Form["tb"]); TableName = tb; f = ParseFields(); ClauseBuilder cw = new ClauseBuilder(new string[] { " and ", " and ", " or " }, new string[] { "", "", "" }); Node nw = ParseClause("wheres"); cw.BuildClause(nw, new string[] { "", "", "" }, 0); if (!string.IsNullOrEmpty(cw.MergeRlt)) { w += " where " + cw.MergeRlt; } ClauseBuilder co = new ClauseBuilder(new string[] { " , ", " " }, new string[] { "", "" }); Node nd = ParseClause("orders"); co.BuildClause(nd, new string[] { "", "" }, 0); if (!string.IsNullOrEmpty(co.MergeRlt)) { o += " order by " + co.MergeRlt; } s = " select " + f + " from " + tb + w + o; Sql = s; }