SqliteRun.SelectTestMaxStuff C# (CSharp) Method

SelectTestMaxStuff() public static method

public static SelectTestMaxStuff ( int personID, RunType, runType ) : string[]
personID int
runType RunType,
return string[]
    public static string[] SelectTestMaxStuff(int personID, RunType runType)
    {
        Sqlite.Open();

        dbcmd.CommandText = "SELECT session.date, session.name, MAX(distance/time), run.simulated " +
            " FROM run, session WHERE type = \"" + runType.Name + "\" AND personID = " + personID +
            " AND run.sessionID = session.uniqueID";

        LogB.SQL(dbcmd.CommandText.ToString());
        dbcmd.ExecuteNonQuery();

        SqliteDataReader reader;
        reader = dbcmd.ExecuteReader();
        reader.Read();

        string [] str = DataReaderToStringArray(reader, 4);

        reader.Close();
        Sqlite.Close();

        return str;
    }