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

mysql_real_escape_string小细节_MySQL

WBOY
Release: 2016-06-01 13:10:48
Original
1008 people have browsed it

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

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


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