改成
where binary Title like

解决方案 »

  1.   

    改成
    where binary Title like谢谢可以了!但是这样区分大小写了啊。
    比如我搜索小写“s”只返回包含小写“s”的结果,大写字母“S”却不在其中了,请问如何改?多谢!
      

  2.   

    $sql = "select * from content where binary LTRIM(Title) like '%$search%' order by ID desc"
      

  3.   

    mysql好象对中文是按拼音搜索的。达·芬奇密ma(ID:42) 
      

  4.   

    不好意思,上面 写错了,应该是
    $sql = "select * from content where binary LCASE(Title) like '%$search%' order by ID desc"
      

  5.   

    select * from content where binary LCASE(Title) like '%$search%' order by ID desc
    学习中
    试过可以
      

  6.   

    加上 LCASE解决了.谢谢各位!
      

  7.   

    加上 LCASE解决了.谢谢各位!
      

  8.   

    但是又发现一个问题,网上查了一下LCASE函数是将大写字母转变成小写字母。但是我查询大写字母“S”的时候,确返回0值
      

  9.   

    当然了 因为都变小写了……
    可以把 $search 统一为小写 PHP代码中 strtolower($search)或者sql中
    select * from content where binary LCASE(Title) like LCASE('%$search%') order by ID desc
      

  10.   

    按coastcdl(H)大哥说的解决了!结帖了!加分!谢谢!