postgresql7.1
select content_template__get_root_folder()
select i.item_id
from cr_revisions r, cr_items i
where r.item_id = i.item_id
and r.title = :item_url_title
and i.parent_id in (select item_id
from cr_items
where name = :item_url_folder
and parent_id in (select item_id
from cr_items
where name = :item_url_parent_folder))
order by revision_id desc
limit 1