{"id":4757,"date":"2012-05-28T10:35:28","date_gmt":"2012-05-28T10:35:28","guid":{"rendered":"http:\/\/phpcodez.com\/?p=4757"},"modified":"2012-05-28T10:35:28","modified_gmt":"2012-05-28T10:35:28","slug":"sql-or","status":"publish","type":"post","link":"http:\/\/phpcodez.com\/sql-or\/","title":{"rendered":"SQL OR"},"content":{"rendered":"<p>It select the data if one of the conditions given is true<\/p>\n<p><strong>SQL OR Syntax<\/strong><\/p>\n<p>SELECT column_name(s) FROM table_name WHERE column1 operator value OR \u00a0column1 operator value ;<\/p>\n<p><strong>MySQL Table &#8211; users<\/strong><\/p>\n<p>+&#8212;-+&#8212;&#8212;+<br \/>\n| id | name |<br \/>\n+&#8212;-+&#8212;&#8212;+<br \/>\n| \u00a01 | PHP \u00a0|<br \/>\n| \u00a02 | JS \u00a0\u00a0|<br \/>\n| \u00a03 | HTML |<br \/>\n| \u00a04 | PHP \u00a0|<br \/>\n+&#8212;-+&#8212;&#8212;+<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>mysql&gt; select * from users where name=&#8217;PHP&#8217; OR \u00a0id=4;<br \/>\n+&#8212;-+&#8212;&#8212;+<br \/>\n| id | name |<br \/>\n+&#8212;-+&#8212;&#8212;+<br \/>\n| \u00a01 | PHP \u00a0|<br \/>\n| \u00a04 | PHP \u00a0|<br \/>\n+&#8212;-+&#8212;&#8212;+<br \/>\n2 rows in set (0.00 sec)<br \/>\n<strong id=\"internal-source-marker_0.4683211303781718\"><br \/>\n<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It select the data if one of the conditions given is true SQL OR Syntax SELECT column_name(s) FROM table_name WHERE column1 operator value OR \u00a0column1 operator value ; MySQL Table &#8211; users +&#8212;-+&#8212;&#8212;+ | id | name | +&#8212;-+&#8212;&#8212;+ | \u00a01 | PHP \u00a0| | \u00a02 | JS \u00a0\u00a0| | \u00a03 | HTML | | &hellip; <a href=\"http:\/\/phpcodez.com\/sql-or\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">SQL OR<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[332,370,392,457,461],"class_list":["post-4757","post","type-post","status-publish","format-standard","hentry","category-sql","tag-mysql","tag-php","tag-query","tag-sql","tag-statement"],"_links":{"self":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/4757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/comments?post=4757"}],"version-history":[{"count":0,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/4757\/revisions"}],"wp:attachment":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/media?parent=4757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/categories?post=4757"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/tags?post=4757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}