select item_id from cr_items where name=:name and parent_id=:folder_id select revision_id from cr_revisions where item_id=:new_item_id select item_id from cr_items where name=:name and parent_id=:folder_id select folder_id from cr_folders where package_id=:package_id select item_id from cr_items where name=:fname and content_type='content_folder'