insert into ims_ent_groups (ims_ent_group_id, recstatus)
values (:ims_ent_group_id, :recstatus)
select ims_ent_lang_id from ims_ent_langs
where lang = :lang
insert into ims_ent_comments (ims_ent_comment_id, ims_ent_tag_id, tag_type, comments)
values (:ims_ent_comment_id, :ims_ent_tag_id, :tag_type, :comments)
insert into ims_ent_comm_lang_map (ims_ent_comment_id, ims_ent_lang_id)
values (:ims_ent_comment_id, :ims_ent_lang_id)
insert into ims_ent_sourcedids (ims_ent_sourcedid_id, ims_ent_tag_id, tag_type, sourcedidtype, source, id)
values (:ims_ent_sourcedid_id, :ims_ent_tag_id, :tag_type, :sourcedidtype, :source, :id)
insert into ims_ent_gr_grouptypes (ims_ent_gr_grouptype_id, ims_ent_group_id, scheme)
values (:ims_ent_gr_grouptype_id, :ims_ent_group_id, :scheme)
insert into ims_ent_gr_typevalues (ims_ent_gr_typevalue_id, ims_ent_gr_grouptype_id, typevalue, level)
values (:ims_ent_gr_typevalue_id, :ims_ent_gr_grouptype_id, :typevalue, :level)
insert into ims_ent_gr_descriptions (ims_ent_gr_description_id, ims_ent_group_id, short, long, full_name)
values (:ims_ent_gr_description_id, :ims_ent_group_id, :short, :long, :full)
insert into ims_ent_timeframes (ims_ent_timeframe_id, ims_ent_tag_id, tag_type, begin_date, begin_restrict, end_date, end_restrict, adminperiod)
values (:ims_ent_timeframe_id, :ims_ent_tag_id, :tag_type, :begin_date, :begin_restrict, :end_date, :end_restrict, :adminperiod)
insert into ims_ent_gr_enrollcontrols (ims_ent_gr_enrollcontrol_id, ims_ent_group_id, enrollaccept, enrollallowed)
values (:ims_ent_gr_enrollcontrol_id, :ims_ent_group_id, :enrollaccept, :enrollallowed)
insert into ims_ent_emails (ims_ent_email_id, ims_ent_tag_id, tag_type, email)
values (:ims_ent_email_id, :ims_ent_tag_id, :tag_type, :email)
insert into ims_ent_urls (ims_ent_url_id, ims_ent_tag_id, tag_type, url)
values (:ims_ent_url_id, :ims_ent_tag_id, :tag_type, :url)
insert into ims_ent_gr_relationships (ims_ent_gr_relationship_id, ims_ent_group_id, relation, sourcedid, label)
values (:ims_ent_gr_relationship_id, :ims_ent_group_id, :relation, :sourcedid, :label)
insert into ims_ent_datasources (ims_ent_datasource_id, ims_ent_tag_id, tag_type, datasource)
values (:ims_ent_datasource_id, :ims_ent_tag_id, :tag_type, :datasource)
select class_key from dotlrn_classes_full where trim(class_key) like '%.$parent_key'
limit 1
select user_id
from dotlrn_member_rels_full
where community_id = :community_id
and user_id not in ($member_list)