select item_id
from cr_items
where name = :item_name
and parent_id = :dst_folder_id
select name, item_id
from cr_items
where parent_id = :src_folder_id
select *
from content_glossary_term_count
where folder_id = :src_folder_id
select 1
from content_glossary_term_count
where term = :term
and page = :page
and folder_id = :dst_folder_id
insert into
content_glossary_term_count
(term, page, folder_id, times_used)
values
(:term, :page, :dst_folder_id, :times_used)
update content_glossary_term_count
set times_used = :times_used
where term = :term
and page = :page
and folder_id = :dst_folder_id
select object_id from acs_objects
where title = :item_name
and context_id = :folder_id
select object_id from acs_objects
where title = :object_name
and context_id = :folder_id
select name
from cr_items
where item_id = :object_id
select activity_id
from content_activities
where item_id = :item_id
update content_activities
set activity_id = :activity_id
where item_id = :item_id
insert into
content_activities (item_id, activity_id)
values (:item_id, :activity_id)
select 1
from content_activities
where item_id = :item_id
select object_id
from site_nodes
where parent_id = (
select node_id
from site_nodes
where object_id = (
select package_id
from dotlrn_communities
where community_id = :src_community_id ) )
and name = 'learning-content'
select object_id
from site_nodes
where parent_id = (
select node_id
from site_nodes
where object_id = (
select package_id
from dotlrn_communities
where community_id = :dst_community_id )
)
and name = 'learning-content'
select c.category_id as category_id
from categories c,
category_translations ct
where parent_id is null
and tree_id = :tree_id
and c.category_id = ct.category_id
and ct.locale = :locale
order by category_id
select category_id
from categories
where tree_id = :tree_id
and category_id in ([join $category_ids ,])
order by left_ind desc
select count(ci.item_id)
from category_object_map c, cr_items ci,
cr_revisions r, xowiki_page p
where c.object_id = ci.item_id
and ci.parent_id = :wiki_folder_id
and ci.content_type not in ('::xowiki::PageTemplate')
and ci.name not in ('en:header_page','en:index','en:indexe')
and r.revision_id = ci.live_revision
and p.page_id = r.revision_id
and c.category_id = :cat_id
group by category_id
order by category_id desc
select ci.item_id,
p.page_order,
ci.name,
ci.content_type,
category_id,
xpi.page_instance_id
from category_object_map c,
cr_items ci,
xowiki_page p,
xowiki_page_instance xpi
where c.object_id = ci.item_id
and ci.parent_id = :wiki_folder_id
and ci.content_type not in ('::xowiki::PageTemplate')
and p.page_id = xpi.page_instance_id
and category_id = :cat_id
and xpi.page_instance_id = ci.live_revision
order by p.page_order
select ci.item_id,
p.page_order,
ci.name,
ci.content_type,
category_id,
xpi.page_instance_id
from category_object_map c,
cr_items ci,
xowiki_page p,
xowiki_page_instance xpi
where c.object_id = ci.item_id
and ci.parent_id = :wiki_folder_id
and ci.content_type = '::xowiki::PageInstance'
and p.page_id = xpi.page_instance_id
and category_id in ([join $cat_id ","])
and xpi.page_instance_id = ci.live_revision
order by p.page_order
select parent_id,
category_id as category
from categories
where category_id = :category_id
and tree_id = :tree_id
select com.object_id
from category_object_map com $join_clause
where com.category_id = :category_id $where_clause
select com.object_id
from category_object_map com $join_clause
where com.category_id = :category_id $where_clause
select count(p.page_id)
from cr_items ci,
xowiki_page p
where ci.parent_id = :folder_id
and ci.content_type = '::xowiki::PageInstance'
and p.page_id = ci.live_revision
select 1 from cr_items
where name = :page_name
and parent_id = :folder_id
select category_id
from categories
where parent_id = :parent_id
and category_id < :category_id
order by category_id desc
select category_id
from categories
where parent_id = :parent_id
and category_id > :category_id
order by category_id