select description from cr_folders where folder_id = :folder_id
select
ci.item_id
from cr_items ci,
cr_child_rels ccr
where ci.live_revision is not null
and ci.content_type = 'pa_photo'
and ccr.parent_id = :album_id
and ci.item_id = ccr.child_id
order by ccr.order_n
select
ceil(count(*) / [ad_parameter ThumbnailsPerPage])
from
($sql)