dopr25398 2014-02-27 06:34
浏览 30
已采纳

按资本或小写字母搜索单词

I have two values in the database like

  1. This is Name
  2. this is a name

I am searching a phrase th by SQL query

SELECT * FROM [TABLE_NAME] WHERE title LIKE '%th%'

then both filed is showing where I want only to show this is a name part. How should I proceed. I have tried preg_merge and other parts but they didn't work. Is there any SQL Query which can distinguish capital and small letter. Or any php method by which I can search exact term. My table format is UTF8. Not Latin General.

  • 写回答

4条回答 默认 最新

  • dongzongpeng6474 2014-02-27 06:41
    关注

    it will work for you, try this query

    SELECT * FROM table_name WHERE BINARY title LIKE '%th%'
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 在若依框架下实现人脸识别
  • ¥15 网络科学导论,网络控制
  • ¥100 安卓tv程序连接SQLSERVER2008问题
  • ¥15 利用Sentinel-2和Landsat8做一个水库的长时序NDVI的对比,为什么Snetinel-2计算的结果最小值特别小,而Lansat8就很平均
  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同