I am running a php cli script to pro grammatically post to a WordPress blog using WordPress 3.2.1 and using only MySQL to do so. I bumped into a mystery. Even w开发者_StackOverflowhen I insert a post touching only the *_posts table, a new entry is created to *_terms_relationships. How is that done? Is there some kind of MySQL procedure somewhere to automatically do that?
My script to insert a new post
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 (:title,:post,'post_name',now(),now(),now(),now(),1,'publish')
how come this queries provokes a new row to be inserted in *_terms_relationships?
It's not a trigger included with the default Wordpress install (I just checked), maybe it's updated on a cron run?
精彩评论