select * from bboard_forums where forum_id = :forum_id select * from bboard_categories where category_id = :category_id select live_revision as revision_id from cr_items where item_id = :message_id for update select live_revision as revision_id from cr_items where item_id = :message_id for update select * from acs_messages_all where message_id = :message_id delete from bboard_forum_subscribers where forum_id = :forum_id and subscriber_id = :subscriber_id delete from bboard_category_subscribers where category_id = :category_id and subscriber_id = :subscriber_id delete from bboard_thread_subscribers where thread_id = :thread_id and subscriber_id = :subscriber_id select count(*) as subscribed_p from bboard_category_subscribers where category_id = :category_id and subscriber_id = :user_id select count(*) as subscribed_p from bboard_forum_subscribers where subscriber_id = :user_id and forum_id in (select bc.forum_id from bboard_categories bc where bc.category_id = :category_id) select count(*) as subscribed_p from bboard_forum_subscribers where forum_id = :forum_id and subscriber_id = :user_id select count(*) as subscribed_p from bboard_category_subscribers where subscriber_id = :user_id and category_id in (select bcmm.category_id from bboard_category_message_map bcmm where bcmm.message_id = :message_id) select count(*) as subscribed_p from bboard_forum_subscribers where subscriber_id = :user_id and forum_id in (select bfmm.forum_id from bboard_forum_message_map bfmm where bfmm.message_id = :message_id) select moderated_p from bboard_forums where forum_id = :forum_id select short_name as forum_name from bboard_forums where forum_id = :forum_id select reply_to, sender, title, mime_type, content, email, first_names||' '||last_name as full_name from acs_messages_all, persons, parties where message_id = :message_id and person_id = sender and party_id = person_id select short_name as forum_name from bboard_forums where forum_id = :forum_id