Creating a unique alphanumeric 10-character string

前端 未结 7 2181
青春惊慌失措
青春惊慌失措 2020-12-06 12:32

I\'m looking to create a simple short-lived reservation system, and I\'d like to generate confirmation numbers that are

  • unique
  • random-looking
7条回答
  •  情歌与酒
    2020-12-06 12:49

    If it's really just 500, then pre-generate 20,000 of them, into a table, then get the "next unused one" when you need it.

提交回复
热议问题