xfund4's recent timeline updates
xfund4

xfund4

V2EX member #232989, joined on 2017-05-29 03:06:12 +08:00
Per xfund4's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
xfund4's recent replies
Jan 15, 2018
Replied to a topic by xfund4 PHP 如何生成固定长度唯一随机字符串?
@chinvo @Magnus1k @toan 如果没有自增 ID,并且不希望是预生成的。 有没有更好的办法呢
Jan 15, 2018
Replied to a topic by xfund4 PHP 如何生成固定长度唯一随机字符串?
谢谢诸位提供的方案, 因为有自增 ID 来为保证唯一。确实 hashids 的方案比较适合。

@chinvo @ylsc633
Jan 15, 2018
Replied to a topic by xfund4 PHP 如何生成固定长度唯一随机字符串?
@moult 是的,我不希望再查一次数据库防碰撞。62 进制补足 8 位 这个随机补位有可能会造成重复啊。
Jan 15, 2018
Replied to a topic by xfund4 PHP 如何生成固定长度唯一随机字符串?
@chinvo 由于数据量是可控的, 所以额外要求了生成的串 必须是 8 位 [A-Z1-9]
Jan 15, 2018
Replied to a topic by xfund4 PHP 如何生成固定长度唯一随机字符串?
@Sypher 类似兑换码的业务,数据库压力很低, 不想借助 redis 之类的服务。

另外,生成的随机串要求上面给错了。 是 [A-Z1-9]
Jan 15, 2018
Replied to a topic by xfund4 PHP 如何生成固定长度唯一随机字符串?
@Keyes 类似于 生成邀请码,兑换码。
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1026 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 10ms · UTC 22:50 · PVG 06:50 · LAX 15:50 · JFK 18:50
♥ Do have faith in what you're doing.