Variable binding in PHP ADOdb

独自空忆成欢 提交于 2019-12-01 04:51:41

问题


Does ADOdb do data sanitation or escaping within the same functionality by default? Or am I just confusing it with Code Igniter's built-in processes?

Does binding variables to parameters in ADOdb for PHP prevent SQL injection in any way?


回答1:


Correct - bound parameters are not vulnerable to SQL injection attacks.




回答2:


yes, you pass the array of parameters.

$rs = $db->Execute('select * from table where val=?', array('10'));

Rest of their docs can be found here:



来源:https://stackoverflow.com/questions/76359/variable-binding-in-php-adodb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!