{"id":43,"date":"2014-06-10T00:46:38","date_gmt":"2014-06-10T00:46:38","guid":{"rendered":"https:\/\/www.lianeallen.com\/home\/?p=43"},"modified":"2014-06-10T00:46:38","modified_gmt":"2014-06-10T00:46:38","slug":"ilike-sushi","status":"publish","type":"post","link":"https:\/\/www.lianeallen.com\/home\/2014\/06\/ilike-sushi\/","title":{"rendered":"ILIKE sushi"},"content":{"rendered":"<p>I don&#8217;t <b>actually<\/b> like sushi. As a matter of fact, it ranks right up there with mushroom quiche on the &#8220;food hate&#8221; scale. But I find it wicked funny that the case-insensitive SQL command for filtering by a string is ILIKE (the case sensitive version is LIKE). It means you can end up writing a query that looks like this code snippet:<\/p>\n<blockquote><p>\n&nbsp;&nbsp;&nbsp;SELECT galleries.name, COUNT(images.id)<br \/>\n&nbsp;&nbsp;&nbsp;FROM galleries JOIN images<br \/>\n&nbsp;&nbsp;&nbsp;ON galleries.id = images.gallery_id<br \/>\n&nbsp;&nbsp;&nbsp;WHERE images.name <strong>ILIKE &#8216;sushi&#8217;<\/strong><br \/>\n&nbsp;&nbsp;&nbsp;GROUP BY galleries.id ORDER BY galleries.id; <\/p><\/blockquote>\n<p>I&#8217;m easily amused. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I don&#8217;t actually like sushi. As a matter of fact, it ranks right up there with mushroom quiche on the &#8220;food hate&#8221; scale. But I find it wicked funny that the case-insensitive SQL command for filtering by a string is ILIKE (the case sensitive version is LIKE). It means you can end up writing a &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.lianeallen.com\/home\/2014\/06\/ilike-sushi\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;ILIKE sushi&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":44,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":1,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":45,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts\/43\/revisions\/45"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/media\/44"}],"wp:attachment":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/media?parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/categories?post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/tags?post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}