SELECT
authors.id,
authors.name
FROM
authors,
posts
WHERE
posts.authorid = authors.id AND
posts.id = :id;