Re: DB::oci8 question

From: Date: Sat, 14 Jul 2001 11:26:50 +0000
Subject: Re: DB::oci8 question
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-745@lists.php.net to get a copy of this message
Ok I know I'm hogging this tread but. I did some work to address the problem, assuming a new place holder is introduced (#) and a new constant is defined DB_PARAM_PROC (maybe this should be DB_PARAM_REFCUR or somthing ) The following example should work if the attached patch is applied ex: include("DB.php"); PEAR::setErrorHandling(PEAR_ERROR_PRINT); $db = DB::connect("oci8://***:***@athena"); $usercode = "HAR"; $crit = "%"; $sql = " begin ITENA2.BROKER.GETCUSTOMERS( ? , ?, #); end; "; $stmt = $db->prepare($sql); $db->execute($stmt, array($usercode, $crit, null)); // The execute will create a new cursor in $this->cursor and execute it $curs =& $db->cursor; while (OCIFetchInto($curs, &$data)) { var_dump($data); } Now there are some issues to be thought of 1) should the null be passed to execute, I'm only passing it to avoid the DB_ERROR_MISMATCH error. 2) should the cursor become the last statment so that methods like fetchRow etc can be used or should we have somthing like getCursorResult() method which would return a result object with the cursor as the last_stmt. In the patch I'm just saving the cursor in $object->cursor. I hope I get some feedback until monday, who is the maintainer of oci8.php yavor begin 666 oci8.diff M,S$Y8S,Q.0H\(" @(" @(" @)'1O:V5N<R ]('-P;&ET*"=;7"9</UTG+" D M<75E<GDI.PT*+2TM"CX@(" @(" @(" D=&]K96YS(#T@<W!L:70H)UM<)EP_ M7"-=)RP@)'%U97)Y*3L-"C,R.6$S,S L,S,R"CX@"0EC87-E("<C)SH-"CX@ M(" @(" @(" @(" @(" @(" @(" D='EP97-;)'1O:V5N*RM=(#T@1$)?4$%2 M04U?4%)/0SL-"CX@(" @(" @(" @(" @(" @(" @("!B<F5A:SL-"C,V-F,S M-CD*/" @(" @(" @(" @(" @(" @)'!D871A6R1I72 ]("1D871A6R1I73L- M"BTM+0H^(" @(" @(" @(" @(" @(" D<&1A=&%;)&E=(#TF("1D871A6R1I M73L-"C,V.6,S-S(*/" @(" @(" @(" @(" @(" @)'!D871A6R1I72 ]("1D M871A.PT*+2TM"CX@(" @(" @(" @(" @(" @("1P9&%T85LD:5T@/28@)&1A M=&$[#0HS-S)A,S<V"CX@#0HS.# L,S@R8S,X-"PS.3<*/" @(" @(" @(" @ M("!I9B H(4!/0TE":6YD0GE.86UE*"1S=&UT+" B.F)I;F0B("X@)&DL("1P M9&%T85LD:5TL("TQ*2D@>PT*/" @(" @(" @(" @(" @(" @<F5T=7)N("1T M:&ES+3YO8VDX4F%I<V5%<G)O<B@D<W1M="D[#0H\(" @(" @(" @(" @('T- M"BTM+0H^( D@(" @#0H^( D@(" @:68H)'1Y<&5S6R1I72 ]/2!$0E]005)! M35]04D]#*7L-"CX@"2 @(" ))'1H:7,M/F-U<G-O<B ]($]#24YE=T-U<G-O M<B@D=&AI<RT^8V]N;F5C=&EO;BD[#0H^( D@(" @(" @(" @(&EF("@A3T-) M0FEN9$)Y3F%M92@D<W1M="P@(CIB:6YD(B N("1I+" F)'1H:7,M/F-U<G-O M<BP@+3$L($]#25]"7T-54E-/4BDI('L-"CX@(" @(" @( D)(" @(" @("!R M971U<FX@)'1H:7,M/F]C:3A286ES945R<F]R*"1S=&UT*3L-"CX@"2 @( E] M#0H^( D)+R]O8VEE>&5C=71E*"1T:&ES+3YC=7)S;W)S6R1I72D[#0H^( D@ M(" @?0T*/B )(" @(&5L<V5[#0H^( D@(" @(" @(" @(&EF("@A3T-)0FEN M9$)Y3F%M92@D<W1M="P@(CIB:6YD(B N("1I+" D<&1A=&%;)&E=+" M,2DI M('L-"CX@(" @(" @( D)(" @(" @("!R971U<FX@)'1H:7,M/F]C:3A286ES M945R<F]R*"1S=&UT*3L-"CX@"2 @( E]#0H^( D@(" @?0T*/B )(" @( T* M,S@S83,Y.0H^( T*,S@Y830P-BPT,3 */B )#0H^( EI9BAI<W-E="@D=&AI M<RT^8W5R<V]R*2E[#0H^( D);V-I97AE8W5T92@D=&AI<RT^8W5R<V]R*3L- M"CX@"7T-"CX@"0T*,SDR830Q- H^( D-"C0X,&$U,#,L-3$P"CX@(" @('T- M"CX@#0H^(" @(" O+R!]?7T-"CX@(" @("\O('M[>R!Q=6]T95-T<FEN9R@I M#0H^( T*/B @(" @9G5N8W1I;VX@<75O=&53=')I;F<H)'-T<FEN9RD-"CX@ M(" @('L-"CX@(" @(" @("!R971U<FX@<W1R7W)E<&QA8V4H(B<B+" B)R<B -+" D<W1R:6YG*3L-"@`` ` end

« previous php.pear.dev (#745) next »