{"id":569,"date":"2012-09-26T09:56:14","date_gmt":"2012-09-26T09:56:14","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=569"},"modified":"2022-02-17T07:14:04","modified_gmt":"2022-02-17T07:14:04","slug":"like-to-search-within-text-fields","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/mysql\/queries\/select\/like-to-search-within-text-fields","title":{"rendered":"LIKE to search within text fields"},"content":{"rendered":"<p>\n<span style=\"color:#FF0000;\"><em><strong>This is PHP4 Code!<\/strong><\/em><\/span>\n<\/p>\n<h4>\nSimple Example<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n\tforeach ($search_tags_array as $tag_word)\r\n\t{\r\n\t\t$sql = &quot;SELECT indexer FROM videos WHERE indexer != &#39;$vid&#39; AND title LIKE &#39;%$tag_word%&#39;&quot;;\r\n\t\t$query = @mysql_query($sql);\r\n\t\twhile ($result1 = @mysql_fetch_array($query))\r\n\t\t\t$tmp_result_search[] = $result1['indexer'];\r\n\t}\r\n<\/code><\/pre>\n<h4>\nMultiple LIKE tests<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n  &quot; WHERE (title LIKE &#39;%$keyword%&#39; OR tags LIKE &#39;%$keyword%&#39; OR description LIKE &#39;%$keyword%&#39;)&quot;\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is PHP4 Code! Simple Example foreach ($search_tags_array as $tag_word) { $sql = &quot;SELECT indexer FROM videos WHERE indexer != &#39;$vid&#39; AND title LIKE &#39;%$tag_word%&#39;&quot;; $query = @mysql_query($sql); while ($result1 = @mysql_fetch_array($query)) $tmp_result_search[] = $result1[&#8216;indexer&#8217;]; } Multiple LIKE tests &quot; WHERE (title LIKE &#39;%$keyword%&#39; OR tags LIKE &#39;%$keyword%&#39; OR description LIKE &#39;%$keyword%&#39;)&quot;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64],"tags":[],"class_list":["post-569","post","type-post","status-publish","format-standard","hentry","category-select"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/569","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=569"}],"version-history":[{"count":7,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/569\/revisions"}],"predecessor-version":[{"id":1834,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/569\/revisions\/1834"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}