postgresql7.2
select
item_id as resource_item_id
FROM
rl_resources_revisionsx
where resource_revision_id in ([join $approve ", "])
select
item_id as resource_item_id
FROM
rl_resources_revisionsx
where resource_revision_id in ([join $delete ","])
select
rl_resource__delete_item(:del)
update
rl_resources
set approved_p = 't'
where
resource_item_id = :app
select
item_id as resource_item_id
FROM
rl_resources_revisionsx
where resource_revision_id = :rev
select rl_resource__new_revision (
:resource_item_id,
:titl,
:desc,
now(),
:user_id,
:peeraddr,
:package_id
);