|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-28 09:07 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
Description: ------------ At the moment PHP, works very or, yet type of consultations towards the data base oracle, but something exists, that I have not been able to make work, or not this supported by PHP, that is what desire to know. I have a pack in Oracle: CREATE PACKAGE Prov_Pkg AS TYPE tblEName IS TABLE OF VARCHAR2(130) INDEX BY BINARY_INTEGER; PROCEDURE Prov (o_EName OUT tblEName) END Prov_pkg; CREATE PACKAGE BODY Prov_Pkg AS PROCEDURE Prov (o_EName OUT tblEName) IS CURSOR cur_employee IS SELECT razon_social FROM Proveedores; RecordCount NUMBER DEFAULT 0; BEGIN FOR curRecProv IN cur_prov LOOP RecordCount:= RecordCount + 1; o_EName(RecordCount):= curRecProv.razon_social; END LOOP; END Prov; END Prov_Pkg; This is everything what I have in oracle, a procedure and a package This returns a collection to me type table, not a cursor, and I have not been able to make it work with PHP, however with ASP, this he is very facil, desire to know, if PHP, supports this Reproduce code: --------------- $sql = "Begin Prov_pkg.Prov(:o_EName);End;"; $stmt = OCIParse($conn,$sql); OCIBindByName($stmt,':o_EName',$o_EName); OCIExecute($stmt); echo $o_EName->getelem(0); it does not work a comparison of the competition that if it does set cm = server.createobject("adodb.command") cm.activeconnection = conexion cm.commandtext = "{call PROV_PKG.PROV({resultset 9,o_EName})}" cm.commandtype = &H0001 set reg = server.createobject("adodb.recordset") reg.activeconnection = conexion reg.cursortype = 3 set reg.source = cm reg.open largo = 0 response.write "salida<br>" do while not reg.eof response.write reg("o_EName") & "<br>" reg.movenext loop