Home >Backend Development >PHP Tutorial > 关于mysql的查询话语

关于mysql的查询话语

WBOY
WBOYOriginal
2016-06-13 13:24:27871browse

关于mysql的查询语句

SQL code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->SELECT * FROM dede_archives where dede_archives.title LIKE  '%李明%' or dede_archives.title LIKE  '%黄飞%' limit 0,10


以上语句在查询中共输出:李明、李明瑞、李明天、黄飞、黄飞龙。
我只想要完全匹配,只输出:李明、黄飞。我应该怎么做?

------解决方案--------------------
那lz就用精确查询撒

SELECT * FROM dede_archives where dede_archives.title = '李明' or dede_archives.title = '黄飞' limit 0,10
------解决方案--------------------
探讨

那lz就用精确查询撒

SELECT * FROM dede_archives where dede_archives.title = '李明' or dede_archives.title = '黄飞' limit 0,10
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn