// Select all photos $result = mysql_query("SELECT a.pid, a.aid, a.title, a.caption, a.keywords, b.title atitle from {$CONFIG['TABLE_PICTURES']} a, {$CONFIG['TABLE_ALBUMS']} b where a.aid = b.aid order by a.aid, a.pid desc"); if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap']); $p_aid = -1 ; // Result to table starttable("100%", Fotoindex, 3); while ($row = mysql_fetch_array($result)) { if ($row[aid] != $p_aid) { echo "