Forum OpenACS Development: Response to FIX ME PLSQL problem

Collapse
Posted by Jack Purswani on
Hi

Thanks for the help. I am still a little unsure as to how to proceed. The cursor is begin used to loop through a bunch of rows as far as I can see.

But how do I change the cursor to a loop? Do I just put a loop outside of the section where the cursor is used using the same format as in the Oracle version?

Here is more of the section of code (I think I put too litle info in my previous mail):

  declare

            cursor v_cursor is

            select member_id

            from group_member_map

            where group_id = :group_id;

    begin

          if :role = 'read' then

              for c in v_cursor loop

                  acs_permission__grant_permission(:pres_item_id,
  c.member_id,  'wp_view_presentation');

              end loop;

So would I say... put a 'for' loop outside the 'for' loop already there?

Thanks for the help.
Jack