WordPress.org

Ready to get started?Download WordPress

Forums

SQL code to add category to a post (1 post)

  1. hieronymusdesign
    Member
    Posted 2 years ago #

    hello guys

    I am working on a script to put news items on the word press database. everything is working fine with:

    mysql_query("INSERT INTO wp_posts (post_title,post_content,post_name,post_date,post_date_gmt,post_modified,post_modified_gmt,post_author,post_status) VALUES ('$titlesafe','$textsafe','$titlesafe',now(),now(),now(),now(),1,'publish')") or die(mysql_error());

    [Please post code snippets between backticks or use the code button.]

    What SQL code do i need to add so i can assign a specific category to the post

    Thank you very much in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by hieronymusdesign
  • This topic is not resolved
  • WordPress version: 3.2.1

Tags

No tags yet.