2010-12-08 32 views
0

這是我從Wordpress的$ wpdb-> show_errors和Query的輸出獲得的輸出。惱人的MySQL錯誤

WordPress數據庫錯誤:[您的SQL語法錯誤;檢查對應於你的MySQL服務器版本使用附近的正確語法手冊「1」,在第一行線1]

INSERT INTO wp_posts (
to_ping, post_author, pinged, comment_count, post_password, post_excerpt, 
post_status, comment_status, ping_status, post_parent, menu_order, 
post_content_filtered, post_type, post_mime_type, post_name, post_title, 
post_content, post_date, post_date_gmt, post_modified, post_modified_gmt, guid) 
VALUES (
'', '', '', '0', '', '', 'draft', 'open', 'open', '0', '0', '', 'page', '', 
'test-page', 'This is a test!', 'This is where content goes...', 
'2010-12-08 07:38:05', '2010-12-08 07:38:05', '2010-12-08 07:38:05', 
'2010-12-08 07:38:05', 'http://localhost/wordpress/?page_id=') 
+0

我看來像查詢得到了要麼實例,或先前設置,用1和一對馬車返回。 (除非`INSERT INTO`上面的'1'與傳遞的查詢沒有關係 – 2010-12-08 19:53:01

+0

是的,我剛剛發現它,這是我之前調用的另一個函數,那就是拋出錯誤我的壞 – willbeeler 2010-12-08 20:00:28

回答

3

從字面上有「1」。去掉它。 「1」本身並不是有效的MySQL語法..

1

刪除1在第一線

查詢是完美