{"id":3598,"date":"2023-12-14T17:14:57","date_gmt":"2023-12-14T08:14:57","guid":{"rendered":"https:\/\/www.dogrow.net\/linux\/?p=3598"},"modified":"2023-12-29T01:28:39","modified_gmt":"2023-12-28T16:28:39","slug":"blog149","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/linux\/blog149\/","title":{"rendered":"(149)\u3010DB\u3011WHERE\u53e5\u3067OR\u6761\u4ef6\u3092\u30b7\u30f3\u30d7\u30eb\u306b\u66f8\u304f"},"content":{"rendered":"<h1 class=\"my_h\">1. \u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>SQL\u6587\u3067\u30ec\u30b3\u30fc\u30c9\u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3092\u3059\u308b\u3068\u304d\u3001\u8907\u6570\u6761\u4ef6\u3092 OR \u3067\u7e4b\u304c\u305a\u306b\u30b7\u30f3\u30d7\u30eb\u306b\u66f8\u304d\u305f\u3044\u3002<\/p>\n<h1 class=\"my_h\">2. \u3084\u3063\u3066\u307f\u308b<\/h1>\n<p><span class=\"my_fc_redB\">Before<\/span><\/p>\n<pre class=\"my_pre\">\r\nSELECT * FROM `table` <span class=\"my_fc_deeppinkB\">WHERE `id`=1 OR `id`=5 OR `id`=9 OR `id`=11<\/span>;\r\n<\/pre>\n<p><span class=\"my_fc_blueB\">After<\/span><\/p>\n<pre class=\"my_pre\">\r\nSELECT * FROM `table` <span class=\"my_fc_deeppinkB\">WHERE `id` IN(1,5,9,11)<\/span>;\r\n<\/pre>\n<h1 class=\"my_h\">3. AND\u6761\u4ef6\u3082\u7c21\u6f54\u306b\u66f8\u3051\u308b<\/h1>\n<p><span class=\"my_fc_redB\">Before<\/span><\/p>\n<pre class=\"my_pre\">\r\nSELECT * FROM `table` <span class=\"my_fc_deeppinkB\">WHERE `id`='1' AND `name`='\u3042\u3044\u3046\u3048\u304a' AND `score`='100'<\/span>;\r\n<\/pre>\n<p><span class=\"my_fc_blueB\">After<\/span><\/p>\n<pre class=\"my_pre\">\r\nSELECT * FROM `table` <span class=\"my_fc_deeppinkB\">WHERE (`id`,`name`,`score`)=('1','\u3042\u3044\u3046\u3048\u304a','100')<\/span>;\r\n<\/pre>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>1. \u3084\u308a\u305f\u3044\u3053\u3068 SQL\u6587\u3067\u30ec\u30b3\u30fc\u30c9\u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3092\u3059\u308b\u3068\u304d\u3001\u8907\u6570\u6761\u4ef6\u3092 OR \u3067\u7e4b\u304c\u305a\u306b\u30b7\u30f3\u30d7\u30eb\u306b\u66f8\u304d\u305f\u3044\u3002 2. \u3084\u3063\u3066\u307f\u308b Before SELECT * FROM `table` WHERE `id`=1 O\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/linux\/blog149\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[125,80],"tags":[],"class_list":["post-3598","post","type-post","status-publish","format-standard","hentry","category-db","category-mysql"],"views":1004,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/comments?post=3598"}],"version-history":[{"count":8,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3598\/revisions"}],"predecessor-version":[{"id":3651,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/posts\/3598\/revisions\/3651"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/media?parent=3598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/categories?post=3598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/linux\/wp-json\/wp\/v2\/tags?post=3598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}