VBScript SQL 清理
警惕 Jeff Atwood 的“浴室代码墙”帖子,我认为它会为 VBScript 提供一个值得信赖的 SQL 清理函数非常有用,类似于 PHP 的 mysql_real_escape_string()
函数。
那么,如何使用 VBScript 正确清理输入到 SQL 查询的数据呢?
Wary of Jeff Atwood's "Bathroom Wall of Code" post, I thought it would be useful to have a trustworthy SQL sanitisation function for VBScript, similar to PHP's mysql_real_escape_string()
function.
So, how can I properly sanitise data input into a SQL query using VBScript?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不要这样做。 请改用参数化查询。
Don't do it. Use parameterized queries instead.
或者,使用如下所示的 Escape 函数,
它给出
. 逆向是 UnEscape()
Alternatively, use the Escape function as below
which gives
. The reverse is UnEscape()