开发者

How to generate sequential GUIDs?

Are there PHP l开发者_运维知识库ibraries to generate sequential GUIDs for usage in a MySQL database?


If you mean uuids based on a common prefix, such as MAC and time, have a look at uniqid. Here you can also find some code for RFC 4211 compliant UUIDS. If you want to be on the safe side, use this wrapper to libuuid: pecl uuid. Haven't tested it though, YMMV.


I believe what is being asked for is, does MySQL have support for Sequential Id's the way that SQL Server does?

http://blogs.msdn.com/b/sqlserverfaq/archive/2010/05/27/guid-vs-int-debate.aspx

Now before everyone asks why use GUIDS, GUIDS will allow one to move/merge data between tables and databases.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜