首頁 >後端開發 >php教程 >php的mysql_prepare不能使用表明一类级作为参数

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

WBOY
WBOY原創
2016-06-23 13:38:51976瀏覽

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

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn