oracle8.1.6
select acs_object_id_seq.nextval from dual
declare
dummy integer;
begin
dummy := content_revision.new (
title => :new_title,
description => :new_desc,
item_id => :photo_id,
revision_id => :revision_id,
creation_date => sysdate,
creation_user => :user_id,
creation_ip => :peeraddr
);
end;
update pa_photos
set (user_filename) = (select user_filename
from pa_photos
where pa_photo_id = :previous_revision)
where pa_photo_id = :revision_id
begin
content_item.set_live_revision (
revision_id => :revision_id
);
end;