How to generate unique id in MySQL?

前端 未结 16 2644
生来不讨喜
生来不讨喜 2020-11-29 03:17

I\'m programming a script using PHP and MySQL and I want to get a unique id (consisting of a string: capitals and small letters with numbers) like: gHYtUUi5b.

16条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-29 04:02

    For uniqueness what I do is I take the Unix timestamp and append a random string to it and use that.

提交回复
热议问题