Monday, August 5, 2013

Re: Cakephp blog tutorial, SQL error when INSERTING into posts.

On Mon, Aug 5, 2013 at 11:51 AM, Greg Sarpy <on.constant@gmail.com> wrote:
>
> (..) I am trying to *INSERT INTO POSTS* exactly as it is in the manual:
>
>> INSERT INTO posts (title,body,created)
>> VALUES ('The title', 'This is the post body.', NOW());
> (..)
>
> It immediately outputs the following error:
> (..)
>> MySQL said:
>> #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 'title’, ’This is the post body.’, NOW())' at line 2

I'm not sure about what is going on. But I can suppose the
command is using the typographic quotes (") instead of normal
double quotes (") to delim text.

Did you typed the SQL insert in a Mysql client or just copy-
and-paste the command from the cookbook?

Additionally, check if this tip can help.
http://markmcb.com/2011/11/07/replacing-ae%E2%80%9C-ae%E2%84%A2-aeoe-etc-with-utf-8-characters-in-ruby-on-rails/

Regards.

MARCELO F ANDRADE | Belem, Amazonia, Brazil | http://about.me/mfandrade

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: