cannot insert record with proper category
-
I modified one of the import scripts to pull in my text-file database. Everything works, except for the categories. My blog has 4 categories:
3 FAQ
1 General
4 News
2 Recipe
I want all the imported posts to show up as Category 2. In my PERL code, I have this:
$category = 2; (I also tried $category = “$2”;)
Each time, the INSERT succeeds, but when I look at the story, I get an error message:
Filed under:
Warning: Invalid argument supplied for foreach() in /home/.callahan/mfischer/foo/wp-includes/template-functions-category.php on line 65
� @ 8:08 am Edit This
I can fix it with a manual edit, but I want to know, what is supposed to go here???
(Here is my SQL):
$mlf_query = “INSERT INTO wp_posts (post_author, post_date, post_content, post_title, post_category, post_name, post_status, comment_status) VALUES (‘$author’, ‘$posted’, ‘$content’, ‘$title’, ‘$category’, ‘$post_name’, ‘publish’, ‘
open’)”;
The topic ‘cannot insert record with proper category’ is closed to new replies.