{"id":200496,"date":"2025-05-06T08:18:45","date_gmt":"2025-05-06T00:18:45","guid":{"rendered":"https:\/\/server.hk\/cnblog\/200496\/"},"modified":"2025-05-06T08:18:45","modified_gmt":"2025-05-06T00:18:45","slug":"%e5%a6%82%e4%bd%95%e9%ab%98%e6%95%88%e5%9c%b0%e5%b0%86%e5%89%8d%e7%ab%afjson%e6%95%b0%e7%bb%84%e6%95%b0%e6%8d%ae%e6%89%b9%e9%87%8f%e6%8f%92%e5%85%a5mysql%e6%95%b0%e6%8d%ae%e5%ba%93%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/200496\/","title":{"rendered":"\u5982\u4f55\u9ad8\u6548\u5730\u5c06\u524d\u7aefJSON\u6570\u7ec4\u6570\u636e\u6279\u91cf\u63d2\u5165MySQL\u6570\u636e\u5e93\uff1f"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>\u5982\u4f55\u9ad8\u6548\u5730\u5c06\u524d\u7aefJSON\u6570\u7ec4\u6570\u636e\u6279\u91cf\u63d2\u5165MySQL\u6570\u636e\u5e93\uff1f <\/h1>\n<p>\u76ee\u524d\u4e3b\u673a\u5b9d\u8d1d\u4e0a\u5df2\u7ecf\u6709\u5f88\u591a\u5173\u4e8e\u7684\u6587\u7ae0\u4e86\uff0c\u81ea\u5df1\u5728\u521d\u6b21\u9605\u8bfb\u8fd9\u4e9b\u6587\u7ae0\u4e2d\uff0c\u4e5f\u89c1\u8bc6\u5230\u4e86\u5f88\u591a\u5b66\u4e60\u601d\u8def\uff1b\u90a3\u4e48\u672c\u6587\uff0c\u4e5f\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\uff0c\u5982\u679c\u9605\u8bfb\u5b8c\u540e\u771f\u7684\u5bf9\u4f60\u5b66\u4e60\u6709\u5e2e\u52a9\uff0c\u6b22\u8fce\u52a8\u52a8\u624b\u6307\uff0c\u8bc4\u8bba\u7559\u8a00\u5e76\u5206\u4eab~<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241106\/1730890851672b4c638b42e.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>php\u6279\u91cf\u63d2\u5165json\u6570\u7ec4\u8fdb\u6570\u636e\u5e93<\/strong><\/p>\n<p>\u524d\u7aef\u4f20\u5165\u4e00\u4e2ajson\u6570\u7ec4\u6570\u636e$data\uff0c\u9700\u8981\u5faa\u73af\u5c06\u5176\u63d2\u5165\u5230\u6570\u636e\u5e93\u4e2d\u3002\u7531\u4e8e\u6570\u636e\u91cf\u53ef\u80fd\u5f88\u5927\uff0c\u56e0\u6b64\u9700\u8981\u9ad8\u6548\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a\u5206\u6279\u5904\u7406<\/strong><\/p>\n<p>\u5efa\u8bae\u5c06\u6570\u636e\u5206\u6279\u5904\u7406\uff0c\u5047\u8bbe\u67095000\u6761\u6570\u636e\uff1a<\/p>\n<p><strong>1-1000\u6761\uff1a<\/strong><\/p>\n<pre>insert into tablename (``id``, ``name``, ...) \nvalues (1, 'name1', ...),(2, 'name2', ...) .... ;<\/pre>\n<p><strong>1001-2000\u6761\uff1a<\/strong><\/p>\n<pre>INSERT INTO tablename (``id``, ``name``, ...) \nVALUES (1001, 'name1', ...),(1002, 'name2', ...) .... ;<\/pre>\n<p>\u4ee5\u6b64\u7c7b\u63a8\uff0c\u76f4\u81f3\u7b2c4001-5000\u6761\u3002<\/p>\n<p><strong>\u5206\u6279\u5904\u7406\u7684\u7406\u7531\uff1a<\/strong><\/p>\n<ol>\n<li>mysql\u652f\u6301\u6279\u91cf\u63d2\u5165\u529f\u80fd\u3002<\/li>\n<li>\u6bcf\u6761sql\u8bed\u53e5\u7684\u5927\u5c0f\u6709\u9650\u5236\uff0c\u5206\u6279\u5904\u7406\u53ef\u4ee5\u907f\u514d\u8d85\u8fc7\u9650\u5236\u3002<\/li>\n<\/ol>\n<p>\u5b9e\u9645\u5904\u7406\u65b9\u5f0f\u53ef\u6839\u636e\u5177\u4f53\u60c5\u51b5\u8c03\u6574\u3002<\/p>\n<p>\u4eca\u5929\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u5e0c\u671b\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff1b\u5173\u4e8e\u6570\u636e\u5e93\u7684\u6280\u672f\u77e5\u8bc6\u6211\u4eec\u4f1a\u4e00\u70b9\u70b9\u6df1\u5165\u4ecb\u7ecd\uff0c\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u4e3b\u673a\u5b9d\u8d1d\u516c\u4f17\u53f7\uff0c\u4e00\u8d77\u5b66\u4e60\u7f16\u7a0b~<\/p>\n<dl>\n<dt>\n <\/dt>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u9ad8\u6548\u5730\u5c06\u524d\u7aefJSON\u6570\u7ec4\u6570\u636e&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-200496","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/200496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=200496"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/200496\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=200496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=200496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=200496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}