{"id":9858,"date":"2018-12-20T06:53:47","date_gmt":"2018-12-19T21:53:47","guid":{"rendered":"https:\/\/www.itblog.jp\/?p=9858"},"modified":"2018-12-20T06:53:47","modified_gmt":"2018-12-19T21:53:47","slug":"mysql%e3%80%81php%e7%92%b0%e5%a2%83%e3%81%a7%e3%81%ae%e3%83%88%e3%83%a9%e3%83%b3%e3%82%b6%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"https:\/\/www.itblog.jp\/?p=9858","title":{"rendered":"MySQL\u3001PHP\u74b0\u5883\u3067\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u52c9\u5f37\u3057\u3066\u3044\u308b\u3068\u3001\u3084\u305f\u3089\u51fa\u3066\u304f\u308b\u306e\u304c\u300c\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u300d\u3084\u300c\u30b3\u30df\u30c3\u30c8\u300d\u300c\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u300d\u3068\u3044\u3046\u8a00\u8449\u3067\u3059\u3002<\/p>\n<p>PHP\u3084Mysql\u3067\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u6848\u4ef6\u306b\u643a\u308f\u3063\u3066\u3044\u3066\u3082\u3001\u3053\u308c\u3089\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3068\u3044\u3046\u4ed5\u7d44\u307f\u306b\u906d\u9047\u3059\u308b\u6a5f\u4f1a\u304c\u5b9f\u306f\u305d\u308c\u307b\u3069\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u306e\u3067\u30a4\u30e1\u30fc\u30b8\u3068\u3057\u3066\u306f\u63b4\u307f\u3065\u3089\u304b\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3068\u306f<\/h2>\n<p>\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3068\u306f\u3001\u8907\u6570\u306eSQL\u306e\u5b9f\u884c\u51e6\u7406\u3092\uff11\u3064\u306e\u307e\u3068\u307e\u308a\u306b\u307e\u3068\u3081\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u5185\u3067\u306eSQL\u5b9f\u884c\u6642\u306b\u6b63\u5e38\u306b\u5b9f\u884c\u3067\u304d\u306a\u304b\u3063\u305f\u308a\u3001\u4f55\u304b\u554f\u984c\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u958b\u59cb\u6642\u307e\u3067\u5dfb\u304d\u623b\u3059\uff08\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\uff09\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u5206\u304b\u308a\u3084\u3059\u3044\u4f8b\u3067\u3044\u3046\u3068\u3001\u9280\u884c\u53e3\u5ea7\u304b\u3089\u5225\u53e3\u5ea7\u3078\u306e\u9001\u91d1\u304c\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u3042\u308b\u53e3\u5ea7\u304b\u3089\u304a\u91d1\u3092\u5f15\u304d\u843d\u3068\u3059\u51e6\u7406\u3092\u884c\u3063\u3066\u3001\u5225\u8b1b\u5ea7\u306b\u52a0\u7b97\u3059\u308b\u51e6\u7406\u3092\u884c\u3046\u307e\u3067\u306e\u9593\u306b\u30b7\u30b9\u30c6\u30e0\u969c\u5bb3\u304c\u767a\u751f\u3057\u305f\u3068\u3059\u308b\u3068\u3001\u53e3\u5ea7\u304b\u3089\u304a\u91d1\u304c\u5f15\u304b\u308c\u305f\u72b6\u614b\u3067\u3001\u5225\u306e\u53e3\u5ea7\u306b\u306f\u304a\u91d1\u304c\u52a0\u7b97\u3055\u308c\u3066\u3044\u306a\u3044\u72b6\u614b\u306b\u306a\u308a\u3001\u305d\u3053\u304b\u3089\u5fa9\u5143\u3067\u304d\u306a\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092\u9632\u3050\u306e\u304c\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3068\u3044\u3046\u4ed5\u7d44\u307f\u3067\u3001\u307e\u3068\u307e\u308a\u306e\u51e6\u7406\u304c\u7d42\u4e86\u3059\u308b\u307e\u3067\u306e\u9593\u306b\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u305f\u3089\u521d\u671f\u306e\u6bb5\u968e\u306b\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3092\u3057\u3066\u5dfb\u304d\u623b\u3057\u305f\u308a\u3001\u3042\u308b\u3044\u306f\u8cc7\u6e90\u3092\u30ed\u30c3\u30af\u3057\u3066\u3001\u4ed6\u306e\u51e6\u7406\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<h2>MySQL+PHP\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u4ed5\u69d8<\/h2>\n<p>MySQL+PHP\u3067\u306f\u30aa\u30fc\u30c8\u30b3\u30df\u30c3\u30c8\u304cON\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u3069\u3046\u3044\u3046\u3053\u3068\u304b\u3068\u3044\u3046\u3068\u3001\u500b\u5225\u306bSQL\u3092\u5b9f\u884c\u3059\u308b\u305f\u3073\u306b\u81ea\u52d5\u3067Commit\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001SQL\u306f\u500b\u5225\u306b\u51e6\u7406\u3055\u308c\u308b\u305f\u3081\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306a\u9280\u884c\u53e3\u5ea7\u306e\u51e6\u7406\u306e\u3088\u3046\u306a\u4ed5\u7d44\u307f\u3092\u5b9f\u88c5\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u4ed5\u7d44\u307f\u3092\u5225\u9014\u8a18\u8ff0\u3057\u3066\u5b9f\u88c5\u3057\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>PHP\u306b\u3082 begin Transaction\u3000commit rollback\u3068\u3044\u3063\u305f\u6a5f\u80fd\u304c\u3042\u308b\u305f\u3081\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u4ed5\u7d44\u307f\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u81ea\u5206\u304c\u73fe\u5728\u4f5c\u6210\u3057\u3066\u3044\u308bSQL\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u4ed5\u7d44\u307f\u3092\u5c0e\u5165\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u3068\u3044\u3046\u306e\u306f\u3001\u305d\u306e\u51e6\u7406\u306b\u3088\u308b\u305f\u3081\u3001\u5fc5\u305a\u3057\u3082\u5168\u3066\u306e\u51e6\u7406\u3067\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u8a18\u8ff0\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u4ed5\u7d44\u307f\u3068\u3057\u3066\u306f\u7406\u89e3\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u52c9\u5f37\u3057\u3066\u3044\u308b\u3068\u3001\u3084\u305f\u3089\u51fa\u3066\u304f\u308b\u306e\u304c\u300c\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u300d\u3084\u300c\u30b3\u30df\u30c3\u30c8\u300d\u300c\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u300d\u3068\u3044\u3046\u8a00\u8449\u3067\u3059\u3002 PHP\u3084Mysql\u3067\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u6848\u4ef6\u306b\u643a\u308f\u3063\u3066\u3044\u3066\u3082\u3001\u3053\u308c\u3089\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3068\u3044\u3046\u4ed5\u7d44\u307f\u306b\u906d\u9047\u3059\u308b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[168,131],"tags":[],"class_list":["post-9858","post","type-post","status-publish","format-standard","hentry","category-sql","category-131"],"_links":{"self":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9858","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9858"}],"version-history":[{"count":0,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9858\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9858"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9858"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}