DBError(); $objAlbum->selectTab("album_foto_conteudo af", "af.*, f.*", "INNER JOIN foto_conteudo f ON (af.idAlbum = f.idAlbum) WHERE f.capaAlbum = '1' GROUP BY af.nomeAlbum DESC ORDER BY af.idAlbum DESC, f.idFoto DESC"); if($_SESSION['IDIOMA'] == 1){ $idiom = 'port'; } else if($_SESSION['IDIOMA'] == 2){ $idiom = 'ingl'; } $cont = 0; while($album = mysql_fetch_array($objAlbum->resultado)){ $capaAlbum = new DB(); $capaAlbum->DBError(); $capaAlbum->selectTab("foto_conteudo", "*", "WHERE idAlbum = " . $album['idAlbum'] . " AND capaAlbum = 1 ORDER BY idFoto DESC LIMIT 1"); $capa = mysql_fetch_array($capaAlbum->resultado); $idCapa = $capa['idFoto']; if($album['foto'] != ''){ $cont++; if(($cont%2) == 0){ echo '
  • '; } else{ echo '
  • '; } ?>
  • DBError(); $objAlbum->selectTab("foto_conteudo", "*", "WHERE idAlbum = " . $album['idAlbum'] . " AND idFoto <> ".$idCapa." ORDER BY idFoto DESC"); $cont = 0; while($album = mysql_fetch_array($objAlbum->resultado)){ if($album['foto'] != ''){ $cont++; echo '
  • '; ?>
  • '; } else{ echo '
  • '; } ?>