这种匹配是啥回事

WBOY
Release: 2016-06-23 13:34:45
Original
795 people have browsed it

在写php获取数据库信息的时候,看到别人这么写SELECT * FROM `sw_goods` WHERE ( goods_name like "诺%" )
其中的 like "诺%"
是匹配啥呢?
我的印象中两边都要有%,一边有的情况是咋回事呢


回复讨论(解决方案)

like "诺%"
表示以 诺 开头

like "%诺%"
表示含有 诺 

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