Fetch posts from database