开发者

Annoying MySQL Error

This is the output I'm getting from the $wpdb->show_errors from Wordpress, and the output of the Query.

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds开发者_如何学Python to your MySQL server version for the right syntax to use near '1' at line 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=') 


There is literally a "1" on the first line. Remove it. "1" alone is not valid MySQL syntax..


remove 1 at the first line

query is perfect

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜