public double[][] loadAll(boolean which) throws SQLException {
    //Load up JDBC.
    try {
      Class.forName("org.sqlite.JDBC");
    }
    catch (ClassNotFoundException e) {
      e.printStackTrace();
      return null;
    }

    //Open a connection and make a statement from it.
    Connection connection = DriverManager.getConnection("jdbc:sqlite:" + dbPath);
    Statement statement = connection.createStatement();
    
    //Get the number of rows in our databse.
    int rows = statement.executeUpdate("SELECT * FROM " + (which ? "good" : "bad"));
    
    //Actually select the rows into a ResultSet
    ResultSet result = statement.executeQuery("SELECT * FROM " + (which ? "good" : "bad"));
    
    double[][] r = new double[rows][result.getMetaData().getColumnCount() - 1];

    //Loop through our results and put them all into a big array.
    for (int i = 0; result.next(); i += 1) {
      for (int x = 2; x <= r[i].length + 1; x += 1) {
        r[i][x] = result.getDouble(x + 1);
      }
    }

    connection.close();

    return r;
  }