public static Product find(String key, String value) throws SQLException {
		PreparedStatement s = null;
		Product p = new Product();

         // Open a connection to the database using DriverManager
		try {
			try {Class.forName("org.postgresql.Driver");} catch (ClassNotFoundException ignore) {}
			currentCon = DriverManager.getConnection(dbName);
			String query = "SELECT * FROM products WHERE " + key + " = ?";// + key + " = " + value;
			s = currentCon.prepareStatement(query);
			s.setString(1, value);
			rs = s.executeQuery();
			
			if (rs.next()) {
				p.setId(rs.getLong("id"));
				p.setName(rs.getString("name"));
				p.setSku(rs.getString("sku"));
				p.setCategory(rs.getInt("cid"));
				p.setPrice(rs.getInt("price"));
			}
		} finally {
			if (rs != null) try {rs.close();} catch (SQLException ignore) {}
			if (s != null) try {s.close();} catch (SQLException ignore) {}
			if (currentCon != null) try {currentCon.close();} catch (SQLException ignore) {}
		}
		return p;
	}