How would I combine the following two quieries to produce a combination of the two?
SELECT *
FROM post_attributes
WHERE name IN ('title', 'body');
SELECT id, url, created_at, name, value
FROM posts, post_attributes
WHERE posts.id = post_attributes.post_id
ORDER BY id;
The idea would be to extract the post number, it's url, the time it was created, the title and body of the blog post from the blogging engine Chyrp, but disregard the other data stored in the same database.
I am thinking that I am going about this in the wrong manner. Would there be a more appropriate function to use?