在CakePHP中使用Email组件的send()方法时出现MySQL错误

发布于 2024-09-11 15:20:26 字数 481 浏览 11 评论 0原文

我已按照此处的教程进行操作:http://book.cakephp。 org/view/1286/Sending-a-basic-message,我之前在 1.2 中已经成功使用过。但是,在 1.3 中,使用不同的应用程序时,我收到以下错误:

警告 (512):SQL 错误:1064:您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,了解在第 1 行“发送”附近使用的正确语法 [CORE/cake/libs/model/datasources/dbo_source.php,第 673 行]
查询:发送

I've followed the tutorial here: http://book.cakephp.org/view/1286/Sending-a-basic-message, which I have successfully used before with 1.2. However, in 1.3, with a different application, I get the following error:

Warning (512): SQL 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 'send' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 673]

Query: send

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

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

发布评论

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

评论(3

〗斷ホ乔殘χμё〖 2024-09-18 15:20:26

这是一个 SQL 错误,因此请尝试打印出 SQL 查询尝试执行的内容,并在 MySQL Workbench 的查询编辑器中单独运行它,看看如何修复它。

您可能遗漏了一些小东西,例如转义单引号。似乎与发送消息无关

This is a SQL error, so try to print out what the SQL query tries to execute and run it separately in MySQL Workbench's query editor to see how you can fix it.

You're probably missing something small, like escaping single quotes. Doesn't seem related to sending the message

小糖芽 2024-09-18 15:20:26

请在您的帖子中包含 mysql 查询,以便我们可以查明问题的根源。

Please include the mysql query in your post, so we can pinpoint the root of the problem.

镜花水月 2024-09-18 15:20:26

这是与MySQL版本有关的错误。您使用的是哪个版本的 MySQL?检查CakePHP 1.2和1.3中使用的MySQL版本,然后你会看到是否有一些差异。

MySQL 4.x 到 5.x 变化很大,如果你不查看数据库版本而选择 CakePHP 版本,你可能会得到很多错误。 =)

This is an error related with the version of MySQL. Which version of MySQL you are using? Check the MySQL version used in CakePHP 1.2 and 1.3, then you will see if there is some difference.

MySQL 4.x to 5.x changes a lot, if you chance the CakePHP version without looking to the database version, you can get a lot of errors. =)

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