Home >Database >Mysql Tutorial >mysql_real_escape_string小细节_MySQL

mysql_real_escape_string小细节_MySQL

WBOY
WBOYOriginal
2016-06-01 13:10:481004browse

这个函数因为要考虑到连接的当前字符集 ,所以要先链接到mysql。如果没链接到数据库,就直接返回空了。

本来这个函数还是为了防止sql注入的,所以,还是干脆就用pdo吧。pdo才是正道啊。


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