views:

78

answers:

3

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

A: 

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

Jauzsika
A: 

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

Fabiano
A: 

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

AcidRaZor
I'm sorry, for some reason I can't get my query since the page breaks. I'm currently getting this error: Notice (8): Undefined property: Email::$enabled [CORE/cake/libs/controller/component.php, line 142]I am using some version of MySQL 5.
Nick
I'm sorry everyone. I made a stupid mistake. I added 'Email' to both the $components array and the $uses array. Thanks anyway!
Nick
Good that you found it. Reading the question I understood that something which should not be in Model is added there :) Anyway
Nik