Sunday, 18 August 2013

In Wordpress SQL database, where does it show which attachment(s) has been assigned to which post?

In Wordpress SQL database, where does it show which attachment(s) has been
assigned to which post?

I was able to tap into my wordpress database and pull all the rows from
the "wp_posts" table with "post_type=post" and display the content on
another page (not wordpress, just built from scratch). The problem I have
is the images (in the database "attachments") are in the same table with
"post_type=attachment". So I cannot pull the correct images into my site.
I can't find how they are related to the posts. I thought
"wp_term_relationships" was my answer but those are just category
relationships. In short, Where are the image relationships?

No comments:

Post a Comment