SELECT i.*, (SELECT url FROM trc_fotos WHERE estado=3 AND idPagina=i.id ORDER BY RAND() LIMIT 0,1) AS afoto FROM trc_juv_grupos i WHERE i.id=