Use $wpdb->post2cat instead of wp_main_post2cat. Bug 442. Hat tip: ludoo.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-11-09 02:40:09 +00:00
parent 9f3fcc45ee
commit 9f893ae091
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ $now = date('Y-m-d H:i:s');
$now_gmt = gmdate('Y-m-d H:i:s');
$wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_title, post_category, post_modified, post_modified_gmt) VALUES ('1', '$now', '$now_gmt', 'Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!', 'Hello world!', '0', '$now', '$now_gmt')");
$wpdb->query( "INSERT INTO `wp_main_post2cat` (`rel_id`, `post_id`, `category_id`) VALUES (1, 1, 0)" );
$wpdb->query( "INSERT INTO $wpdb->post2cat (`rel_id`, `post_id`, `category_id`) VALUES (1, 1, 0)" );
// Default comment
$wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content) VALUES ('1', 'Mr WordPress', 'mr@wordpress.org', 'http://wordpress.org', '127.0.0.1', '$now', '$now_gmt', 'Hi, this is a comment.<br />To delete a comment, just log in, and view the posts\' comments, there you will have the option to edit or delete them.')");