public ArrayList<Product> getProducts(String filter) {
		ArrayList<Product> products = new ArrayList<Product>();
		try {
			Connection conn = openConnection();
			Statement stat = conn.createStatement();
			Statement stat2 = conn.createStatement();
			ResultSet rs = stat.executeQuery("select * from "
					+ DB_PRODUCT_TABLE + ";");

			int category_id;
			while (rs.next()) {
				category_id = rs.getInt("category_id");
				ResultSet categorySet = stat2.executeQuery("select name from "
						+ DB_CATEGORY_TABLE + " where rowid = " + category_id
						+ ";");
				categorySet.next();
				String category = categorySet.getString("name");
				if (filter == null || category.equals(filter)) {
					products.add(new Product(rs.getRow(), rs.getString("name"),
							rs.getInt("price"), category, rs.getInt("inventory")));
				}
			}
			rs.close();
			conn.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return products;
	}