dtbl1231 2014-12-11 02:47
浏览 102

使用LIKE运算符的Mysql查询返回无结果

I am using php my admin to test my query and when I test a simple query like:

SELECT * FROM song WHERE title LIKE '%anytitle%'

It returns an empty result. With any title it gives me the same thing.

If i try the same thing on my other table users

SELECT * FROM users WHERE email LIKE '%gmail%'

It works and return all record containing gmail.

The table are built the same, utf8_unicode_ci and VARCHAR.

What could be the problem?

edit:

I destroyed my table and I have rebuild it.I have executed the query with just one row in the table and it worked. I've repopulated the table and now it does not work.

I have 5029 records in the table. Would it be a setting somewhere?

Re edit: When I try like

SELECT * FROM song WHERE title LIKE '%d%'

It return every record where there is a d inside the title name. But if I try with more than one letter it does not work, I have no result.

I've updated mysql, I've unistalled it and installed version 5.6 instead and still the same issue.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向
    • ¥15 如何用python向钉钉机器人发送可以放大的图片?
    • ¥15 matlab(相关搜索:紧聚焦)
    • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
    • ¥15 路易威登官网 里边的参数逆向
    • ¥15 Arduino无法同时连接多个hx711模块,如何解决?
    • ¥50 需求一个up主付费课程