postgresql7.1
select ans.question as question,
ans.entry_id as entry_id,
f.faq_id as faq_id,
f.faq_name as faq_name,
(select site_node__url(site_nodes.node_id)
from site_nodes, acs_objects
where site_nodes.object_id = acs_objects.context_id and acs_objects.object_id=f.faq_id) as url,
to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date
from faq_q_and_as ans, faqs f, acs_objects o,
dotlrn_communities com, acs_objects o2
where o.object_id=ans.entry_id
and ans.faq_id=f.faq_id
and o.creation_user= :oneUser
and com.community_id= :oneCom
and o2.object_id=f.faq_id
and apm_package__parent_id(o2.context_id) = com.package_id
select ans.question as question,
ans.entry_id as entry_id,
f.faq_id as faq_id,
f.faq_name as faq_name,
(select site_node__url(site_nodes.node_id)
from site_nodes, acs_objects
where site_nodes.object_id = acs_objects.context_id and acs_objects.object_id=f.faq_id) as url,
to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date
from faq_q_and_as ans, faqs f, acs_objects o
where o.object_id=ans.entry_id
and ans.faq_id=f.faq_id
and o.creation_user= :oneUser
select f.faq_name as faq_name,
f.faq_id as faq_id,
(select site_node__url(site_nodes.node_id)
from site_nodes, acs_objects
where site_nodes.object_id = acs_objects.context_id and acs_objects.object_id=f.faq_id) as url,
to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date
from faqs f, acs_objects o, dotlrn_communities com
where o.object_id=f.faq_id
and com.community_id= :oneCom
and apm_package__parent_id(o.context_id) = com.package_id
select f.faq_name as faq_name,
f.faq_id as faq_id,
(select site_node__url(site_nodes.node_id)
from site_nodes, acs_objects
where site_nodes.object_id = acs_objects.context_id and acs_objects.object_id=f.faq_id) as url,
to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date
from faqs f, acs_objects o
where o.object_id=f.faq_id
select first_names,
last_name,
email,
to_char(creation_date, 'YYYY-MM-DD HH24:MI:SS') as registration_date,
to_char(last_visit, 'YYYY-MM-DD HH24:MI:SS') as last_visit
from cc_users
where user_id = :oneUser
select f.community_key as key,
f.community_id as id,
f.pretty_name as pretty_name,
to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date
from dotlrn_communities_full f, acs_objects o
where f.community_id= :oneCom
and o.object_id= f.community_id