I am using Python and MySQLdb, I have a table which is displayed below but I get error message each time I try to insert into the table.
INSERT INTO reviews (entry,created_time, user_id, branch_id, title)VALUES('branches that would lead use to the ciyrt', '2011-09-20 00:24:24',1, ,1, 'oogletivers')
CREATE TABLE reviews
(
id int(9) unsigned not null primary key auto_increment,
entry text not null ,
created_time timestamp not null,
user_id tinyin开发者_开发百科t unsigned not null references users(id),
branch_id tinyint unsigned not null references branches( id),
title varchar(255),
FULLTEXT(title, entry)
)
mysql_exceptions.ProgrammingError: (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 '1, 'oogletivers')' at line 1")
You have two commas without anything between them. Remove one.
精彩评论