ARTICLE AD BOX
So i have a php function that passes some variables into a call to an oracle stored procedure. you can select more than one option on screen to submit so for example you can choose option A, B & C and hit submit and using a foreach loop through each option and pass the data into the call for the stored proc. now heres the part thats confusing me. i have exactly 500 options so if i choose 300 or more and submit oracle throws me a ORA-01000: maximum open cursors exceeded( i know my oracle cursor limit is 300 in this particular case). i did use a cursor in the procedure but i thought implicit cursors closed on their own. so even removing the cursor from the procedure it still throws me the error.
this is the php code block that calls the package
foreach($data['option'] as $val) { $query = "BEGIN FIRST_PKG.Add_CUST_OPTION'$USER_ID','1',$val,sysdate,'$CUST_ID','$STORE_id'); END;"; $this->db->query($query); if($this->db->execute()) { } else { echo "insert fail"; } }This is the oracle package
PROCEDURE Add_CUST_OPTION( V_USER_ID IN BUSTAR.USERS.USER_ID%TYPE, V_STATUS_ID IN BUSTAR.USERS.STATUS_ID%TYPE, V_OPTION_ID IN BUSTAR.USERS.OPTION_ID%TYPE, V_CDATE IN BUSTAR.USERS.CDATE_ID%TYPE, V_CUSTO_ID BUSTAR.USERS.CUSTOMER_ID%TYPE, ) IS BEGIN UPDATE BUSTAR.USERS SET OPTION_ID= V_OPTION_ID, STATUS_ID= V_STATUS_ID, CDATE_ID= V_CDATE, UPDATED_BY = V_USER_ID, CUSTOMER_ID= CUSTOMER_ID WHERE USER_ID= V_USER_ID ; END Add_CUST_OPTION;i dont know much about cursors so i assume im missing something here?
any help is appreciated !!
