コード例 #1
0
 /// <summary>
 /// Increment a global tracking statistic counter stored in the
 /// database (if statistic tracking was enabled).
 /// </summary>
 /// <param name="Statistic">Supplies the counter name.</param>
 public void ACR_IncrementStatistic(string Statistic)
 {
     Implementation.ACR_SQLExecute(String.Format(
                                       "INSERT INTO `stat_counters` (`Name`, `Value`, `LastUpdate`) " +
                                       "VALUES ('{0}', 1, NOW()) " +
                                       "ON DUPLICATE KEY UPDATE `Value` = `Value` + 1, " +
                                       "`LastUpdate`=NOW()",
                                       Implementation.ACR_SQLEncodeSpecialChars(Statistic)));
 }
コード例 #2
0
 /// <summary>
 /// This routine escapes characters for a SQL query.
 /// </summary>
 /// <param name="s">Supplies the string to escape.</param>
 /// <returns>The escaped string is returned.</returns>
 public string ACR_SQLEncodeSpecialChars(string s)
 {
     return(Implementation.ACR_SQLEncodeSpecialChars(s));
 }