• MySQL查询长数据是无值返回(可以尝试换行符)


      如,要在数据库中包含这样数据的记录有多少条:

      <table class="link-more-blue" style=" 100%;" border="0" cellspacing="0" cellpadding="0">

         <tbody>

              <tr class="grid-head-wrap">

                   <td>File Name</td>

                   <td width="110">Size</td>

                   <td width="70">&nbsp;</td>

            </tr>

         </tbody>

       </table>

       直接使用 SQL语句查询:

        SELECT count(*) FROM driver_lookup_com.content 
        where introtext like '%<table class="link-more-blue" style=" 100%;" border="0" cellspacing="0" cellpadding="0"><tbody>"+

              "<tr class="grid-head-wrap"><td>File Name</td><td width="110">Size</td><td width="70">&nbsp;</td></tr></tbody></table>%';

        

        结果没数据返回,明明数据库中就有记录,为什么呢,可能是忘了换行符?

        SELECT count(*) FROM driver_lookup_com.content 

        where introtext like '%<table class="link-more-blue" style=" 100%;" border="0" cellspacing="0" cellpadding="0"> <tbody>"+

              " <tr class="grid-head-wrap"> <td>File Name</td> <td width="110">Size</td> <td width="70">&nbsp;</td> </tr> </tbody></table>%';

          

        换行符:Windows用

                   Linux用

  • 相关阅读:
    CentOS7搭建FTP服务器和安装FTP客户端
    Python实现网络和IP地址计算
    [Leetcode Weekly Contest]270
    [Leetcode Weekly Contest]269
    [Leetcode Weekly Contest]266
    Vue.use原理及源码解读
    Rust 程序设计语言 6
    go 语言的 Context
    Rust程序设计语言(7)
    手机界面设计中12种常用布局转载
  • 原文地址:https://www.cnblogs.com/tommy-huang/p/4545612.html
Copyright © 2020-2023  润新知