select mime_type from ml_mail_classes where mail_class_id = :class_or_copy_id select r.title || ' (' || r.content_length || ' bytes)', r.revision_id, c.mime_type as old_mime_type from cr_items i, cr_revisions r, ml_mail_classes c where c.mail_class_id = :class_or_copy_id and i.parent_id = c.mail_class_id and r.revision_id = i.live_revision select label as name, locale as value from ad_locales select name, locale, sender_email, subject, subject_change_p, text_header, text_header_change_p, text_body, text_body_change_p, text_footer, text_footer_change_p, html_header, html_header_change_p, html_body, html_body_change_p, html_footer, html_footer_change_p, mime_type, comments from ml_mail_classes where mail_class_id = :copy_class_id select name, locale, sender_email, subject, subject_change_p, text_header, text_header_change_p, text_body, text_body_change_p, text_footer, text_footer_change_p, html_header, html_header_change_p, html_body, html_body_change_p, html_footer, html_footer_change_p, mime_type, comments from ml_mail_classes where mail_class_id = :class_id update cr_items set live_revision = null where parent_id = :class_id and live_revision = :delete_css select item_id from cr_items where parent_id = :class_id update cr_items set live_revision = latest_revision where parent_id = :class_id select r.title as filename, r.content_length, r.mime_type as file_mimetype, r.revision_id, i.item_id from cr_revisions r, cr_items i where i.parent_id = :copy_class_id and r.revision_id = i.live_revision