/// <summary> /// Begins a new SELECT statement with a COUNT([table].[field]) as the first result /// </summary> /// <param name="field">The name of the field to count</param> /// <param name="table">The name of the table (or alias) containing the field to count</param> /// <returns>A new DBSelectQuery to support statement chaining</returns> public static DBSelectQuery SelectCount(string table, string field) { DBSelectSet sel = DBSelectSet.SelectCount(table, field); DBSelectQuery q = new DBSelectQuery(); q.SelectSet = sel; return(q); }
// // DBSelectQuery factory methods // #region public static DBQuery SelectCount() + 3 overloads /// <summary> /// Begins a new SELECT statement with a COUNT(*) as the first result /// </summary> /// <returns>A new DBSelectQuery to support statement chaining</returns> public static DBSelectQuery SelectCount() { DBSelectSet sel = DBSelectSet.SelectCount(); DBSelectQuery q = new DBSelectQuery(); q.SelectSet = sel; q.Last = sel; return(q); }