This code creates an RSS feed from a custom blog.

$blog->get_posts() returns the results of "SELECT * FROM blog_posts"

$blog->last_post_date returns the result of 'SELECT * from blog_posts ORDER BY id DESC LIMIT 1'

The resultant RSS feed validates as a valid RSS 2.0 feed.