{"id":1941,"date":"2019-01-15T09:45:26","date_gmt":"2019-01-15T09:45:26","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=1941"},"modified":"2022-02-17T07:14:01","modified_gmt":"2022-02-17T07:14:01","slug":"useful-queries","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/mysql\/queries\/working-on-live-databases\/useful-queries","title":{"rendered":"Useful queries"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Find rows<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM ### WHERE ### = 14 AND ### = 'yes' ORDER BY ### ASC LIMIT 250<\/code><\/pre>\n\n\n\n<p>With DateTimes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM ### WHERE ### = 14 AND ### > \"2019-01-01 00:00:00\" AND ### &lt; \"2019-01-01 00:00:00\" ORDER BY ### ASC LIMIT 250<\/code><\/pre>\n\n\n\n<p>If string contains<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM ### WHERE ### LIKE '%SomeText I WantToMatch%' AND ### = 'yes' ORDER BY ### ASC LIMIT 250<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">How many rows in a table<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT COUNT(*) FROM tblMyTable;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Find rows With DateTimes: If string contains How many rows in a table<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[163],"tags":[],"class_list":["post-1941","post","type-post","status-publish","format-standard","hentry","category-working-on-live-databases"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=1941"}],"version-history":[{"count":7,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1941\/revisions"}],"predecessor-version":[{"id":1983,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1941\/revisions\/1983"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=1941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=1941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=1941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}