码迷,mamicode.com
首页 > 数据库 > 详细

php的mysql_prepare不能使用表明一类级作为参数

时间:2015-03-10 19:29:32      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:php mysql

No, a parameterised query doesn‘t just drop the parameter values in to the query string, it supplies the RDBMS with the parameterised query and the parameters separately. But such a query can‘t have a table name or field name as a parameter. The only way to do that is to dynamically code the table name into the query string, just as you have already done. If this string is potentially open to attack you should validate it first; such as against a white list list of allowable table

php的mysql_prepare不能使用表明一类级作为参数

标签:php mysql

原文地址:http://blog.csdn.net/hellochenlian/article/details/44177929

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!