ZenphotoCMS Forum
images per page and subalbums counting? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: images per page and subalbums counting? (/thread-1503.html)



images per page and subalbums counting? - BertSimons - 2007-06-25

I am making my first zenphoto site, thanks to the forum I managed to solve a lot of things.. one thing though i can't get a grip on is this.
on my test site testsite I have 9 images 2 videos (counted as images) and 2 sub albums, the sub albums are not counted and they exceed the numeber of images per page as set to 12.

with the function:
function show_sub_count_index() {
$id = getIDforAlbum();
$sql = "SELECT COUNT(*) FROM ". prefix("albums") ." WHERE parentid = $id";
$result = query($sql);
$count = mysql_result($result, 0);
echo $count;
}

I am able to count the subalbums in each the album

what i am trying to do is make something like:

images per page wit subalbums = (images per page as set in zp-config) - (show_sub_count_index)

untill now no succes.. any hints?