SELECT COUNT(*) as media_total FROM cpg_pictures AS p LEFT JOIN cpg_albums AS a ON p.aid = a.aid WHERE 1 AND p.approved='YES' AND ((a.visibility = 0 OR a.visibility IS NULL) AND (a.alb_password IS NULL OR a.alb_password = ""))

SELECT COUNT(*) as media_total FROM cpg_albums AS a WHERE a.visibility = 0

SELECT count(*) as media_total FROM cpg_categories AS c

SELECT sum(p.hits) as media_total FROM cpg_pictures AS p LEFT JOIN cpg_albums AS a ON p.aid = a.aid WHERE 1 AND p.approved='YES' AND ((a.visibility = 0 OR a.visibility IS NULL) AND (a.alb_password IS NULL OR a.alb_password = ""))

Nós temos um total de fotos em álbuns e categorias que foram visualizadas vezes.