这是我从 Wordpress 的 $wpdb->show_errors 获得的输出,以及查询的输出。
WordPress 数据库错误:[您的 SQL 语法有误;检查与您的 MySQL 服务器版本对应的手册,了解在第 1 行的“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=')
最佳答案
第一行确实有一个“1”。去掉它。单独的“1”不是有效的 MySQL 语法..
关于mysql - 烦人的 MySQL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4391619/