zoukankan      html  css  js  c++  java
  • 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用

  • 相关阅读:
    hdu1421 搬寝室(dp)
    HDU 2577(DP)
    扩展欧几里德算法
    unique函数的作用
    区间更新 zoj3911
    set的应用
    vue 事件处理器
    vue Class与style绑定
    vue的计算属性
    sass入门
  • 原文地址:https://www.cnblogs.com/tommy-huang/p/4545612.html
Copyright © 2011-2022 走看看