2011-12-19 12 views
0

私は、このクエリでエラーを見つけることができません。MySQLの構文エラー「「近いについて説明)」

INSERT INTO realestate ( 
type, offer, seller, area, build_area, price, is_negotiable, fur, floor_num, rooms, baths, year_built, phone, title, describe 
) VALUES ( 
'2', '1', '1', '98', '99887', '3242839', 'true', 'true', '1', '1', '1', '2010', '97854984576', 'lksehjfsed', 'alidjaopdhkljhdfkedfhwekdfhwseldfk') 

これは私が取得エラーメッセージです:

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 'describe) VALUES ('2', '1', '1', '98', '99887', '324' at line 2 
+0

が重複する可能性がどのように私はSQLを書くことができます:あなたは、列またはテーブル名としてそれを使用する場合はバッククォートで囲む必要がありますMySqlの保護されたキーワードと同じ名前を共有するテーブル?](http://stackoverflow.com/questions/10706920/how-can-i-write-sql-for-a-table-that-shares-the-same -name-as-a-protected-keyword) – Jocelyn

答えて

6

DESCRIBEMySQL reserved keywordです。

INSERT INTO realestate ( 
type, ...., floor_num, rooms, baths, year_built, phone, title, `describe` 
) VALUES ( 
'2', '1', '1', '98', '99887', '3242839', 'true', 'true', '1', '1', '1', '2010', '97854984576', 'lksehjfsed', 'alidjaopdhkljhdfkedfhwekdfhwseldfk') 

は(列が読みやすくするために、リストから削除)... [の

+0

または別の単語を使用する – Strawberry

関連する問題