CountCondition() public static method

public static CountCondition ( string tableName, bool dbconOpened, string condition, string operand, string myValue ) : int
tableName string
dbconOpened bool
condition string
operand string
myValue string
return int
コード例 #1
0
    /*
     * this is only called on client
     */
    public static string [] StatsMine()
    {
        ArrayList stats = new ArrayList();

        Sqlite.Open();

        /*
         * is good to add the string stuff like "Pings"
         * because then client will show this data or not
         * depending if it matches what want to show.
         * Maintain the ':' as separator
         */
        stats.Add("Sessions:" + Sqlite.CountCondition(Constants.SessionTable, true, "serverUniqueID", ">", "0").ToString());
        stats.Add("Persons:" + Sqlite.CountCondition(Constants.PersonTable, true, "serverUniqueID", ">", "0").ToString());
        stats.Add("Jumps:" + Sqlite.CountCondition(Constants.JumpTable, true, "simulated", ">", "0").ToString());
        stats.Add("JumpsRj:" + Sqlite.CountCondition(Constants.JumpRjTable, true, "simulated", ">", "0").ToString());
        stats.Add("Runs:" + Sqlite.CountCondition(Constants.RunTable, true, "simulated", ">", "0").ToString());
        stats.Add("RunsInterval:" + Sqlite.CountCondition(Constants.RunIntervalTable, true, "simulated", ">", "0").ToString());
        stats.Add("ReactionTimes:" + Sqlite.CountCondition(Constants.ReactionTimeTable, true, "simulated", ">", "0").ToString());
        stats.Add("Pulses:" + Sqlite.CountCondition(Constants.PulseTable, true, "simulated", ">", "0").ToString());
        stats.Add("MultiChronopic:" + Sqlite.CountCondition(Constants.MultiChronopicTable, true, "simulated", ">", "0").ToString());

        Sqlite.Close();

        string [] statsString = Util.ArrayListToString(stats);
        return(statsString);
    }