Home  >  Article  >  Backend Development  >  请教个MYSQL的有关问题

请教个MYSQL的有关问题

WBOY
WBOYOriginal
2016-06-13 11:38:31781browse

请问个MYSQL的问题

如果数据库里存的是短字符串:
AB
BC
CD

那么我手上的词是长字符串,例如 ABCD,那么SQL应该怎么写,来匹配出该字符包含有数库里的短词记录?要连着的,要用CONCAT吗?

另外,保存这些短字符串到数据库的时候,如何处理才能安全,会不会有注入之类的隐患?
谢谢

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