简体   繁体   中英

MySQL error when using send() method of Email component in CakePHP

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

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

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. =)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM