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

关于mysql的查询话语

WBOY
Release: 2016-06-13 10:33:15
Original
702 people have browsed it

关于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
Copy after login


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

------解决方案--------------------
那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
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template