Hi guys, this is my first attempt at CakePHP and so far it seems amazing.
I'm not a PHP/DB pro but I am learning.
Anyway, I'm familiarizing myself with the framework by creating the blog in
the tutorial. So far I've successfully created the table, now 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());
INSERT INTO posts (title,body,created)
VALUES ('A title once again', 'And the post body follows.', NOW());
INSERT INTO posts (title,body,created)
VALUES ('Title strikes back', 'This is really exciting! Not.', NOW());
It immediately outputs the following error:
Error
*SQL query:
*INSERThttps://s97211.gridserver.com/.tools/phpMyAdmin/current/url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.1%2Fen%2Finsert.htmltoken=dc469536a0bc464e2477613903bf7463
INTO posts( title, body, created )
VALUES (
’The title’, ’This
IShttps://s97211.gridserver.com/.tools/phpMyAdmin/current/url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.1%2Fen%2Fcomparison-operators.html%23operator_istoken=dc469536a0bc464e2477613903bf7463
the post body.’,
NOWhttps://s97211.gridserver.com/.tools/phpMyAdmin/current/url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.1%2Fen%2Fdate-and-time-functions.html%23function_nowtoken=dc469536a0bc464e2477613903bf7463
( )
);
*MySQL said: *[image: Documentation]
https://s97211.gridserver.com/.tools/phpMyAdmin/current/url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.1%2Fen%2Ferror-messages-server.htmltoken=dc469536a0bc464e2477613903bf7463#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 am now stuck because I do not see what's wrong here. While my SQL is
limited, it looks correct.. can anyone see what could be causing this
error?
Here's the database info:
Apache/2.2.22
Database client version: libmysql - 5.1.66
Thank you for any help!!
--
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+unsubscr...@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.