What I am doing: (wp_posts has ID as primary key and it auto-increase)
mysql_query("INSERT INTO wp_posts (post_content, post_title) VALUES ('$addEP', '$title')");
$rs = mysql_query("SELECT ID FROM wp_posts WHERE post_title='$title'");
$add_row = mysql_fetch_array($rs);
$add_postid = $add_row['ID'];
mysql_query("INSERT INTO wp_term_relationships (object_id, term_taxonomy_id) VALUES ('$add_postid', '$cat_id')");
So basically, what I am doing is; I insert content into wp_posts and then run another query to catch the ID
of the post. Then set it into another table.
Is it possible to do this without running the second query to catch the ID? Thanks.