public static List<Order> list (int uid) throws SQLException {
		PreparedStatement s = null;
		List<Order> cart = new ArrayList<Order>();
		try {
			try {Class.forName("org.postgresql.Driver");} catch (ClassNotFoundException ignore) {}
			currentCon = DriverManager.getConnection(dbName);
			String query = "select products.name, carts.quantity, carts.price from products join carts" +
					" on products.id = carts.pid where uid = ? group by products.name, carts.quantity, carts.price";
			s = currentCon.prepareStatement(query);
			s.setInt(1, uid);
			System.out.println(query);
			rs = s.executeQuery();
			
			while (rs.next()) {
				Order o = new Order(rs.getString("name"), rs.getInt("quantity"), rs.getInt("price"));
				cart.add(o);
			}
		} 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 cart;
	}