{"id":7493,"date":"2024-11-14T11:26:16","date_gmt":"2024-11-14T03:26:16","guid":{"rendered":"https:\/\/fwq.ai\/blog\/7493\/"},"modified":"2024-11-14T11:26:16","modified_gmt":"2024-11-14T03:26:16","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88-mysql-where-%e8%af%ad%e5%8f%a5%e5%9c%a8%e6%9e%9a%e4%b8%be%e5%88%97%e4%b8%ad%e4%bd%bf%e7%94%a8-%e6%af%94%e8%be%83-bool-%e5%80%bc%e6%97%b6%e6%97%a0%e6%b3%95%e6%a3%80","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/7493\/","title":{"rendered":"\u4e3a\u4ec0\u4e48 MySQL WHERE \u8bed\u53e5\u5728\u679a\u4e3e\u5217\u4e2d\u4f7f\u7528 = \u6bd4\u8f83 bool \u503c\u65f6\u65e0\u6cd5\u68c0\u7d22\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173090059494203.jpg\" class=\"aligncenter\" title=\"\u4e3a\u4ec0\u4e48 MySQL WHERE \u8bed\u53e5\u5728\u679a\u4e3e\u5217\u4e2d\u4f7f\u7528 = \u6bd4\u8f83 bool \u503c\u65f6\u65e0\u6cd5\u68c0\u7d22\uff1f\u63d2\u56fe\" alt=\"\u4e3a\u4ec0\u4e48 MySQL WHERE \u8bed\u53e5\u5728\u679a\u4e3e\u5217\u4e2d\u4f7f\u7528 = \u6bd4\u8f83 bool \u503c\u65f6\u65e0\u6cd5\u68c0\u7d22\uff1f\u63d2\u56fe\" \/><\/p>\n<p>\u4e3a\u4ec0\u4e48  \u7684 where \u8bed\u53e5\u5728 bool \u503c\u4e4b\u95f4\u4f7f\u7528 = \u65f6\u65e0\u6cd5\u8fdb\u884c\u68c0\u7d22\uff1f<\/p>\n<p><strong>\u95ee\u9898\uff1a<\/strong><\/p>\n<p>\u8868\u7ed3\u6784\u5305\u542b\u4e00\u4e2a\u679a\u4e3e\u5217 is_svddb_match\uff0c\u5b83\u53ef\u4ee5\u662f &#8216;true&#8217; \u6216 &#8216;false&#8217;\u3002\u4f46\u662f\uff0c\u5f53\u4f7f\u7528 where is_svddb_match = false \u67e5\u8be2\u65f6\uff0c\u7ed3\u679c\u96c6\u4e2d\u6ca1\u6709\u663e\u793a\u4efb\u4f55\u8bb0\u5f55\uff0c\u5373\u4f7f\u5b58\u5728 is_svddb_match \u4e3a &#8216;false&#8217; \u7684\u503c\u3002<\/p>\n<p><strong>\u7b54\u6848\uff1a<\/strong><\/p>\n<p>mysql \u4e2d\u679a\u4e3e\u7c7b\u578b\u7684\u7d22\u5f15\u662f\u4ece 1 \u5f00\u59cb\u7684\uff0c\u800c\u4e0d\u662f\u4ece 0 \u5f00\u59cb\u7684\u3002\u5728\u7ed9\u5b9a\u7684\u8868\u4e2d\uff0c&#8217;true&#8217; \u679a\u4e3e\u503c\u4e3a 1\uff0c\u800c &#8216;false&#8217; \u679a\u4e3e\u503c\u4e3a 2\u3002\u56e0\u6b64\uff1a<\/p>\n<ul>\n<li>where is_svddb_match = false \u7b49\u4e8e where is_svddb_match = 0\uff0c\u8fd9\u662f\u65e0\u6548\u7684\uff0c\u56e0\u4e3a\u7d22\u5f15\u4e2d\u6ca1\u6709\u4e3a &#8216;false&#8217; \u5206\u914d\u7684\u503c 0\u3002<\/li>\n<li>where is_svddb_match = true \u7b49\u4e8e where is_svddb_match = 1\uff0c\u8fd9\u662f\u6709\u6548\u7684\uff0c\u56e0\u4e3a &#8216;true&#8217; \u679a\u4e3e\u503c\u4e3a 1\u3002<\/li>\n<\/ul>\n<p><strong>\u907f\u514d\u6df7\u6dc6\uff1a<\/strong><\/p>\n<p>\u4e3a\u4e86\u907f\u514d\u6df7\u6dc6\uff0c\u907f\u514d\u5c06\u679a\u4e3e\u503c\u76f4\u63a5\u4e0e\u6574\u6570\u8fdb\u884c\u6bd4\u8f83\u3002\u53d6\u800c\u4ee3\u4e4b\u7684\u662f\uff0c\u4f7f\u7528\u5b57\u7b26\u4e32\u6bd4\u8f83\uff1a<\/p>\n<pre>WHERE is_svddb_match = 'false'<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u6b63\u786e\u68c0\u7d22 is_svddb_match \u5217\u503c\u4e3a &#8216;false&#8217; \u7684\u8bb0\u5f55\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e3a\u4ec0\u4e48 MySQL WHERE \u8bed\u53e5\u5728\u679a\u4e3e\u5217\u4e2d\u4f7f\u7528 = \u6bd4\u8f83 bool \u503c\u65f6\u65e0\u6cd5\u68c0\u7d22\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u4ec0\u4e48 \u7684 where \u8bed\u53e5\u5728 bool \u503c\u4e4b\u95f4\u4f7f\u7528 = \u65f6\u65e0\u6cd5\u8fdb\u884c\u68c0\u7d22\uff1f \u95ee\u9898\uff1a \u8868\u7ed3\u6784\u5305\u542b\u4e00\u4e2a\u679a\u4e3e\u5217 is_svddb_match\uff0c\u5b83\u53ef\u4ee5\u662f &#8216;true&#8217; \u6216 &#8216;false&#8217;\u3002\u4f46\u662f\uff0c\u5f53\u4f7f\u7528 where is_svddb_match = false \u67e5\u8be2\u65f6\uff0c\u7ed3\u679c\u96c6\u4e2d\u6ca1\u6709\u663e\u793a\u4efb\u4f55\u8bb0\u5f55\uff0c\u5373\u4f7f\u5b58\u5728 is_svddb_match \u4e3a &#8216;false&#8217; \u7684\u503c\u3002 \u7b54\u6848\uff1a mysql \u4e2d\u679a\u4e3e\u7c7b\u578b\u7684\u7d22\u5f15\u662f\u4ece 1 \u5f00\u59cb\u7684\uff0c\u800c\u4e0d\u662f\u4ece 0 \u5f00\u59cb\u7684\u3002\u5728\u7ed9\u5b9a\u7684\u8868\u4e2d\uff0c&#8217;true&#8217; \u679a\u4e3e\u503c\u4e3a 1\uff0c\u800c &#8216;false&#8217; \u679a\u4e3e\u503c\u4e3a 2\u3002\u56e0\u6b64\uff1a where is_svddb_match = false \u7b49\u4e8e where is_svddb_match = 0\uff0c\u8fd9\u662f\u65e0\u6548\u7684\uff0c\u56e0\u4e3a\u7d22\u5f15\u4e2d\u6ca1\u6709\u4e3a &#8216;false&#8217; \u5206\u914d\u7684\u503c 0\u3002 where is_svddb_match = true \u7b49\u4e8e where is_svddb_match = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-7493","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=7493"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7493\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=7493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=7493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=7493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}