select host
from host_node_map
where node_id = :node_id
$where_clause
and host = :search_vhost
select name, key
from subsite_themes
insert into subsite_themes
(key, name, template, css, js, form_template, list_template,
list_filter_template, dimensional_template, resource_dir,
streaming_head, local_p)
values
(:key, :name, :template, :css, :js, :form_template, :list_template,
:list_filter_template, :dimensional_template, :resource_dir,
:streaming_head, :local_p)
delete from subsite_themes
where key = :key
select *
from subsite_themes
where key = :theme
select pretty_name, package_key
from apm_package_types
where implements_subsite_p = 't'
order by pretty_name