使用准备好的语句,而不是混合使用语句和实际有效负载数据。
看到
- http://dev.mysql.com/tech-resources/articles/4.1/prepared-statements.html
- PDO ::准备
- mysqli ::准备
您可能也对http://shiflett.org/articles/sql-
injection和http://shiflett.org/blog/2007/sep/the-unexpected-sql-
injection感兴趣

使用准备好的语句,而不是混合使用语句和实际有效负载数据。
看到
您可能也对http://shiflett.org/articles/sql-
injection和http://shiflett.org/blog/2007/sep/the-unexpected-sql-
injection感兴趣