public synchronized void insertUser(Map<String, String> details)
			throws SQLException {
		String sql = "select fbid from users where fbid=?";
		preparedStatement = connect.prepareStatement(sql);
		preparedStatement.setString(1, details.get("fbid"));
		resultSet = preparedStatement.executeQuery();
		String fbid = null;
		while (resultSet.next()) {
			fbid = resultSet.getString(1);
		}

		if (fbid != null && details.get("fbid").compareTo(fbid) == 0) {
			return;
		}

		sql = "insert into users(name, fbid, sex, single) values(?,?,?,?)";
		preparedStatement = connect.prepareStatement(sql);
		preparedStatement.setString(1, details.get("name"));
		preparedStatement.setString(2, details.get("fbid"));
		preparedStatement.setString(3, details.get("sex"));
		preparedStatement.setString(4, details.get("single"));
		preparedStatement.execute();
		preparedStatement.close();
		/*Statement statement = connect.createStatement();
		ResultSet foo = statement.executeQuery("select * from users");
		while (foo.next()) {
			System.out.println(foo.getString("name") + " " + foo.getString("id"));
		}
		statement.close();*/

	}