select type
from dotlrn_user_types
order by pretty_name
select pretty_name,
type
from dotlrn_user_types
order by pretty_name
select rel_id
from dotlrn_users
where user_id = :user_id
update dotlrn_user_profile_rels
set portal_id = :portal_id
where rel_id = (select rel_id
from dotlrn_users
where user_id = :user_id)