Forum OpenACS Development: Response to Drop file for the datamodel

Collapse
Posted by Gilbert Wong on
I belive you need to declare a record:
declare
    del_rec  record;
begin
  for del_rec in select item_id from cr_items
        where content_type = ''cr_wp_attachment''
  loop
    update acs_objects set context_id = null where context_id
=del_rec.item_id;
    PERFORM content_item__delete(del_rec.item_id);
  end loop;
return 0;
end;