@Override
	public int insertCustomer(Customer customer) {
		String sql = "INSERT INTO customer (forename, surname, house_no, "
				+ "street, postcode, email, balance, card_no, cust_password)"
				   + " VALUES ('" + customer.getForename() + "', '"
						          + customer.getSurname() + "', '"
						          + customer.getHouseNo() + "', '"
						          + customer.getStreet() + "', '"
						          + customer.getPostCode() + "', '"
						          + customer.getEmail() + "', '"
						          + customer.getBalance() + "', '"
						          + customer.getCardNum() + "', '"
						          + customer.getPassword() + "');";
		Connection con = null;
		try {
			con = getConnection();
			PreparedStatement statement = con.prepareStatement(sql);
			statement.executeUpdate();
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			if (con != null) closeConnection(con);
		}
		
		sql = "SELECT customer_id FROM customer WHERE email='" + customer.getEmail() + "';";
		
		con = null;
		int id = 0;
		try {
			con = getConnection();
			PreparedStatement statement = con.prepareStatement(sql);
			ResultSet resultSet = statement.executeQuery();
			if (resultSet.next()) id = resultSet.getInt("customer_id");
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			if (con != null) closeConnection(con);
		}
		
		return id;
	}