WHERE personid = LTRIM(SUBSTR(people_tab((bulk Num),50,9); How can you use FORALL to update many rows using a PL table, Collection etc? Do you agree that FORALL is quicker than an update in the cursor loop? If you wanted, you could make the L_RECORD variable a package GLOBAL (define it in the body, not in a procedure in the body) and just pass the INDEX around from subroutine to subroutine.
That way, all of the subroutines in this package could access the i'th element of the RECORD of TABLES we have defined.
UPDATE table_Foo Bar SET answer One='yes', answer Two='no', answer Three='yes' WHERE member_id = 1 AND question_id = 1; UPDATE table_Foo Bar SET answer One='no', answer Two='no', answer Three='yes' WHERE member_id = 1 AND question_id = 2; UPDATE table_Foo Bar SET answer One='yes', answer Two='yes', answer Three='no' WHERE member_id = 1 AND question_id = 3; oh, absolutely!!
your problem likely lies in the php code, something about constructing variables and looping (i'm guessing -- i don't do php so i only gave your code a cursory glance) however, since you asked this question in the mysql forum, let me give you a mysql answer redesign your table, normalize it to first normal form you have repeating columns in answer One, answer Two, answer Three these should be three rows in a normalized table from there, the php will be slightly different Hello r937! To address your normalization suggestion, here is my table structure (it goes into a tiny bit more detail; my first example was a very generalized one, this one is also generalized to a certain extent) - and there is a specific reason why I have designed it so...which I will explain in a bit.
OPEN profile_cur FOR sql Stmt; LOOP FETCH profile_cur INTO profile_rec; EXIT WHEN profile_cur%NOTFOUND; Quo To Pur Days( profile_rec.personid , profile_rec. IF changed Flag = TRUE THEN people_tab(x).personid := profile_rec.personid; people_tab(x).quotopurdays := profile_rec.quotopurdays; ...; ...; x := x 1; changed Flag := FALSE; END IF; END LOOP; CLOSE profile_cur; FORALL bulk Num IN 1..people_tab.