DATABASE ERROR:
SELECT a.id as id,
                       a.title as title,
                       a.pubdate as pubdate,
                       a.allow_who as allow_who,
                       'private' as type,
                       p.imageurl as imageurl,
                       COUNT(p.id) as photos_count
                FROM cms_user_photos p
				INNER JOIN cms_user_albums a ON a.id = p.album_id
                WHERE p.user_id='1' AND (
                                a.allow_who='all'
                                OR
                                (a.allow_who='registered' AND (0>0))
                                OR
                                (a.allow_who='friends' AND (0=1))
                            )
                GROUP BY p.album_id
Table 'galub209_rayrad2.cms_user_photos' doesn't exist