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 关于#python#的问题,请各位专家解答!
  • ¥20 Hbase启动失败,无法启动HMaster
  • ¥15 sqpingboot在父模块已经引入了mybatisplus 在子组件不写版本号还是报错
  • ¥20 Lumerical FDTD solutions 中模型的相对阻抗,有效介电常数和有效磁导率的实部和虚部的数据如何获得?
  • ¥100 sql reporting service 远程smtp服务器配置支持
  • ¥15 ppyoloe_r带角度目标检测,loss_cls没法收敛
  • ¥15 淘宝交易指数如何解读,其关联的数据指标是什么
  • ¥15 Linux下安装搜狗拼音不能显示中文
  • ¥15 事件7000导致的自动重启如何解决
  • ¥15 (标签-matlab|关键词-m3)