get data from table with two different constraint

While working on a project for designing rest api I have to write queries which uses database of wordpress. What I’ve to do is get the post title and post featured images from posts table of wordpress, the problem is that wordpress stores data related to posts in two table wp_posts and wp_postmeta where wp_posts contains post related data like post title, post date, images url and many with different version of same data with revision for update data while postmeta table contain data related to attachment, meta decription etc.
What I have to do is to get post_tile and post_featured_image url in same query call but id for featured image row in post is obtained from postmeta query and post_title is present in another row. How to make such query?

Read more here: get data from table with two different constraint

Leave a Reply

Your email address will not be published. Required fields are marked *