: Specified parameter
Copy codeThe Code is as follows: public DataTable TodayToTable (int userId)
{
Return userId> 0? V_CN_TASK_VALID_SCORING_TODAY.QueryTable (condition: "WHERE receiver Id =" + userId): null;
}
The condition: "WHERE receiver Id =" + userId indicates that the specified parameter condition is a parameter of the QueryTable method.Copy codeThe Code is as follows: // <summary>
/// Query records of a specified table
/// </Summary>
/// <Param name = "table"> table name </param>
/// <Param name = "fields"> list of field names in the SELECT clause </param>
/// <Param name = "condition"> query condition </param>
/// <Param name = "args"> List of command parameter names separated by commas </param>
/// <Param name = "vals"> array of command parameter values (optional) </param>
/// <Returns> query result </returns>
Public static DataTable QueryTable (this string table, string fields = null, int? Limit = null, string condition = null, string args = null, params object [] vals)
{
Return GetTable (table. QueryDataSet (fields, limit, condition, args, vals), 0 );
}
?? OperatorCopy codeThe Code is as follows: var m_queryFields = fields. TrimNull ()?? "*";
EqualCopy codeThe Code is as follows: var m_queryFields = fields. TrimNull ()? "*": Fields. TrimNull ();