{"id":342,"date":"2021-11-25T10:26:14","date_gmt":"2021-11-25T10:26:14","guid":{"rendered":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/?p=342"},"modified":"2021-11-25T10:26:14","modified_gmt":"2021-11-25T10:26:14","slug":"using-logical-operators","status":"publish","type":"post","link":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/2021\/11\/25\/using-logical-operators\/","title":{"rendered":"Using Logical Operators"},"content":{"rendered":"\n<p>You can also use the logical operators AND, OR, and NOT in your MySQL WHERE queries to further narrow down your selections. Next example shows one instance of each, but you can mix and match them in any way you need. <br>Using logical operators:<\/p>\n\n\n\n<p><strong>SELECT author,title FROM classics WHERE<br>author LIKE &#8220;Aro%&#8221; AND author LIKE &#8220;%Markku&#8221;;<br>SELECT author,title FROM classics WHERE<br>author LIKE &#8220;%Matti ja Teppo%&#8221; OR author LIKE &#8220;%Esa M\u00e4kel\u00e4%&#8221;;<br>SELECT author,title FROM classics WHERE<br>author LIKE &#8220;Aro%&#8221; AND author NOT LIKE &#8220;%Markku&#8221;;<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can also use the logical operators AND, OR, and NOT in your MySQL WHERE queries to further narrow down your selections. Next example shows one instance of each, but you can mix and match them in any way you need. Using logical operators: SELECT author,title FROM classics WHEREauthor LIKE &#8220;Aro%&#8221; AND author LIKE &#8220;%Markku&#8221;;SELECT &hellip; <a href=\"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/2021\/11\/25\/using-logical-operators\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Using Logical Operators<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/342"}],"collection":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=342"}],"version-history":[{"count":1,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/342\/revisions"}],"predecessor-version":[{"id":343,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/342\/revisions\/343"}],"wp:attachment":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=342"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}