Database Error: No database selected
From:select count(a.id) as rowcount, max(sc.name) as subcat, max(c.name) as cat from album a inner join catalbum ca on ca.albumid = a.id inner join category c on ca.catid = c.id inner join subcategory sc on ca.subcatid = sc.id where c.id = '10' and sc.id = '86' and a.status='active' and 1 = a.properties&1 and 8 = a.properties&8 and (select count(id) as rowcount from albumimage ai inner join image i on i.id = ai.imageid where i.status = 'active' and ai.albumid = a.id) > 0 order by c.id,sc.id