好奇怪,一个php搜索的问题. 改成where binary Title like 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 改成where binary Title like谢谢可以了!但是这样区分大小写了啊。比如我搜索小写“s”只返回包含小写“s”的结果,大写字母“S”却不在其中了,请问如何改?多谢! $sql = "select * from content where binary LTRIM(Title) like '%$search%' order by ID desc" mysql好象对中文是按拼音搜索的。达·芬奇密ma(ID:42) 不好意思,上面 写错了,应该是$sql = "select * from content where binary LCASE(Title) like '%$search%' order by ID desc" select * from content where binary LCASE(Title) like '%$search%' order by ID desc学习中试过可以 加上 LCASE解决了.谢谢各位! 加上 LCASE解决了.谢谢各位! 但是又发现一个问题,网上查了一下LCASE函数是将大写字母转变成小写字母。但是我查询大写字母“S”的时候,确返回0值 当然了 因为都变小写了……可以把 $search 统一为小写 PHP代码中 strtolower($search)或者sql中select * from content where binary LCASE(Title) like LCASE('%$search%') order by ID desc 按coastcdl(H)大哥说的解决了!结帖了!加分!谢谢! 论坛字体与大小问题! PHP PDO 模块,真的可以防SQL注入? 如何获得字符串中的变量值? PHP新手学习求助。。。 请问如何做到网页显示的是B网页的内容,但地址栏显示的确是A网页的地址? 如何Spreadsheet_Excel_Writer 将 xls 数据导入到 mysql 菜鸟级问题,请问,如果实现奇偶行不一样的输出效果?高分~~~ 天啊,阴沟里翻船,PHP_SELF竟然不懂的怎么用 如何实现rm、avi的下载? Ubuntu下新建立的PHP环境出现403 菜鸟急问:超链接, 急,请高手指教
where binary Title like谢谢可以了!但是这样区分大小写了啊。
比如我搜索小写“s”只返回包含小写“s”的结果,大写字母“S”却不在其中了,请问如何改?多谢!
$sql = "select * from content where binary LCASE(Title) like '%$search%' order by ID desc"
学习中
试过可以
可以把 $search 统一为小写 PHP代码中 strtolower($search)或者sql中
select * from content where binary LCASE(Title) like LCASE('%$search%') order by ID desc