2014-04-09 30 views
0

我從菜譜CakePHP的博客教程錯誤蒙山MySQL的NOW()

CREATE TABLE posts (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, 
title VARCHAR(50), 
body TEXT, 
created DATETIME DEFAULT NULL, 
modified DATETIME DEFAULT NULL 
); 

triing的博客教程但是,當我插入他給我

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()); 

值我得到這個錯誤信息

#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 

回答