Adodb,转义引号?

发布于 2024-08-23 05:12:14 字数 126 浏览 5 评论 0原文

我正在使用 adodb 和 php。我需要将 html 插入数据库,并且需要知道在将其插入数据库之前转义引号的最佳方法?我尝试使用 pg_escape_string() 但它似乎仍然没有插入。

做到这一点的最佳方法是什么?

I am using adodb with php. I need to insert html into my database, and need to know the best method to escape the quotes before inserting it into the database? I tried using pg_escape_string() but it still does not seem to insert.

What is the best method to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一直在等你来 2024-08-30 05:12:14

最好的方法是使用参数化查询。请参阅此处开始:

The best method is to use a parameterized query. See here to get started:

失去的东西太少 2024-08-30 05:12:14
$conn = &ADONewConnection('access');

$var = $conn->qstr("Clean");
$conn = &ADONewConnection('access');

$var = $conn->qstr("Clean");
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文