{"id":78,"date":"2023-06-05T13:18:42","date_gmt":"2023-06-05T05:18:42","guid":{"rendered":"http:\/\/pro369.com\/php\/?p=78"},"modified":"2019-04-16T15:24:27","modified_gmt":"2019-04-16T15:24:27","slug":"php%e5%92%8cmysql-guid%e7%9a%84%e7%94%a8%e6%b3%95","status":"publish","type":"post","link":"https:\/\/por.tw\/php\/php%e5%92%8cmysql-guid%e7%9a%84%e7%94%a8%e6%b3%95\/","title":{"rendered":"php\u548cmysql guid\u7684\u7528\u6cd5"},"content":{"rendered":"<p><strong><span style=\"background-color: #ff99cc\">GUID\uff1a<\/span> \u5373Globally Unique Identifier\uff08\u5168\u7403\u552f\u4e00\u6a19\u8b58\u7b26\uff09<br \/> \u4e5f\u7a31\u4f5c UUID(Universally Unique IDentifier) \u3002<\/p>\n<p> GUID\u662f\u4e00\u500b\u901a\u904e\u7279\u5b9a\u7b97\u6cd5\u7522\u751f\u7684\u4e8c\u9032\u4f4d\u9577\u5ea6\u70ba128\u4f4d\u7684\u6578\u5b57\u6a19\u8b58\u7b26\uff0c\u7528\u65bc\u6307\u793a\u7522\u54c1\u7684\u552f\u4e00\u6027\u3002<br \/> GUID \u4e3b\u8981\u7528\u65bc\u5728\u64c1\u6709\u591a\u500b\u7bc0\u9ede\u3001\u591a\u53f0\u96fb\u8166\u7684\u7db2\u8def\u6216\u7cfb\u7d71\u4e2d\uff0c\u914d\u7f6e\u5fc5\u9808\u5177\u6709\u552f\u4e00\u6027\u7684\u6a19\u8b58\u7b26\u3002<\/p>\n<p> \u5728 Windows \u5e73\u53f0\u4e0a\uff0cGUID \u5ee3\u6cdb\u61c9\u7528\u65bc\u5fae\u8edf\u7684\u7522\u54c1\u4e2d\uff0c\u7528\u65bc\u6a19\u8b58\u5982\u5982\u8a3b\u518a\u8868\u9805\u3001\u985e\u53ca\u4ecb\u9762\u6a19\u8b58\u3001\u8cc7\u6599\u5eab\u3001\u7cfb\u7d71\u76ee\u9304\u7b49\u5c0d\u8c61\u3002&nbsp; &nbsp;<\/p>\n<p> php\u4e2d\u4e26\u6c92\u6709\u6a19\u6e96\u7684guid\uff0c\u53ea\u662f\u6709\u500b\u51fd\u6578 uniqid() \u751f\u6210\u552f\u4e00id\u3002<br \/> \u800c\u5728mysql\u4e2d\u6709\u51fd\u6578\u751f\u6210guid\uff1aSELECT UUID()<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>GUID\uff1a \u5373Globally Unique Identifier\uff08\u5168\u7403\u552f\u4e00\u6a19\u8b58\u7b26\uff09 \u4e5f\u7a31\u4f5c UUID(Uni [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":379,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[22],"class_list":["post-78","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-php"],"_links":{"self":[{"href":"https:\/\/por.tw\/php\/wp-json\/wp\/v2\/posts\/78"}],"collection":[{"href":"https:\/\/por.tw\/php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/por.tw\/php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/por.tw\/php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/por.tw\/php\/wp-json\/wp\/v2\/comments?post=78"}],"version-history":[{"count":0,"href":"https:\/\/por.tw\/php\/wp-json\/wp\/v2\/posts\/78\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/por.tw\/php\/wp-json\/wp\/v2\/media\/379"}],"wp:attachment":[{"href":"https:\/\/por.tw\/php\/wp-json\/wp\/v2\/media?parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/por.tw\/php\/wp-json\/wp\/v2\/categories?post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/por.tw\/php\/wp-json\/wp\/v2\/tags?post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}