select rl_resource__new_item ( null, :resource_name, :description, now(), :user_id, :peeraddr, :package_id ); select rl_resource__new_revision ( :resource_item_id, :resource_name, :description, now(), :user_id, :peeraddr, :package_id ); select item_id as resource_item_id, title as resource_name, description FROM rl_resources_revisionsx where resource_revision_id = :resource_revision_id select item_id as resource_item_id FROM rl_resources_revisionsx where resource_revision_id = :resource_revision_id select category_id as category_type_id, short_name as type_short_name FROM rl_resource_category_type ORDER BY ordering select category_id, short_name FROM rl_resource_category_type WHERE category_id = :category_type_id ORDER BY ordering