gpt4 book ai didi

php - 尝试在文本编辑器中保存更改时出现 Mysql 错误 1064

转载 作者:行者123 更新时间:2023-11-30 01:23:42 26 4
gpt4 key购买 nike

我正在运行这个website .

当我在(所见即所得)文本编辑器中保存更改时,出现 mysql 错误 1064

这是第一个错误

Database error: Invalid SQL: UPDATE page_master SET page_title = 'Help', page_content = '

MySQL Error: 1064 (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's bid online. We do charge tradesmen a small fee for each quote they send. Howev' at line 1) Session halted.

这是第二个错误

Database error: Invalid SQL: UPDATE page_master SET page_title = 'Terms and Conditions and use', page_content = '

MySQL Error: 1064 (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's web site is available only to individuals who can form legally binding contrac' at line 1) Session halted.

这是我的 SQL 表。

http://pastebin.com/F15P91TM

最佳答案

正如您确认我上面的评论一样,您必须转义要存储在数据库中的字符串。

只需使用real_escape_string函数,请参阅手册:http://www.php.net/manual/en/mysqli.real-escape-string.php

如果您仍在使用已弃用的 mysql_* 函数,则必须使用:http://php.net/manual/de/function.mysql-escape-string.php 。但同样,mysql_* 的使用已被弃用,不应再使用!

关于php - 尝试在文本编辑器中保存更改时出现 Mysql 错误 1064,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18253096/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com