DATABASE ERROR:

SELECT 1
                FROM cms_blog_posts p
				INNER JOIN cms_blogs b ON b.id = p.blog_id
				LEFT JOIN cms_user_profiles up ON up.user_id = u.id
LEFT JOIN cms_upload_images img ON (img.target_id = p.id AND (img.target = 'blog_post' OR img.target = 'post') AND (img.component = 'blogs' OR img.component = 'clubs'))

                WHERE p.published = 1 AND b.owner = 'club'
                       AND (p.blog_id = '28')
 AND (b.allow_who = 'all')
 AND (p.allow_who = 'all')

Unknown column 'u.id' in 'on clause'