{"id":48,"date":"2024-08-08T12:03:57","date_gmt":"2024-08-08T04:03:57","guid":{"rendered":"https:\/\/a.li6.cc\/?p=48"},"modified":"2024-08-08T12:03:57","modified_gmt":"2024-08-08T04:03:57","slug":"tp5-query%e5%b0%81%e8%a3%85like%e6%9f%a5%e8%af%a2%e8%af%ad%e5%8f%a5","status":"publish","type":"post","link":"https:\/\/a.li6.cc\/index.php\/2024\/08\/08\/tp5-query%e5%b0%81%e8%a3%85like%e6%9f%a5%e8%af%a2%e8%af%ad%e5%8f%a5\/","title":{"rendered":"tp5 query\u5c01\u88c5like\u67e5\u8be2\u8bed\u53e5"},"content":{"rendered":"<pre><code>\u9519\u8bef\u5199\u6cd5\n$sql=&quot;select company_id from tplay_line where start like &#039;%:start%&#039; and end like &#039;%:end%&#039;&quot;;\n$result =Db::query($sql,[&#039;start&#039;=&gt;$post[&#039;start&#039;],&#039;end&#039;=&gt;$post[&#039;end&#039;]]);\n\n\u6b63\u786e\u5199\u6cd5\n$sql=&quot;select company_id from tplay_line where start like :start and end like :end&quot;;\n$result =Db::query($sql,\n[   &#039;start&#039;=&gt;&#039;%&#039;.$post[&#039;start&#039;].&#039;%&#039;,\n     &#039;end&#039;=&gt;&#039;%&#039;.$post[&#039;end&#039;].&#039;%&#039;     ]);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u9519\u8bef\u5199\u6cd5 $sql=&quot;select company_id from t &hellip; <a href=\"https:\/\/a.li6.cc\/index.php\/2024\/08\/08\/tp5-query%e5%b0%81%e8%a3%85like%e6%9f%a5%e8%af%a2%e8%af%ad%e5%8f%a5\/\">\u7ee7\u7eed\u9605\u8bfb <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":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts\/48"}],"collection":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/comments?post=48"}],"version-history":[{"count":1,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts\/48\/revisions"}],"predecessor-version":[{"id":49,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts\/48\/revisions\/49"}],"wp:attachment":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/media?parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/categories?post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/tags?post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}