Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/09/2012, 11:07
afuentealba
 
Fecha de Ingreso: abril-2012
Mensajes: 65
Antigüedad: 12 años
Puntos: 0
Error al mostrar datos (php, oracle)

Caballeros, buenas tardes.

Me toco trabajar por primera vez con package para hacer consultas, no eh logrado hacer andar este codigo:

Código PHP:
<?
include_once ('conexion.php');

$conexion = new conexion;
if(
$conexion->conecta_ora())
{
    
$pi_ruc'0900107120-0';
    
$po_muestragrilla OCINewCursor($conexion->conecta);
    
$sql="BEGIN pk_carvig.p_obt_historial('".$pi_ruc."'"
                                                     
.",:po_muestrahistorial, :po_sw, :po_texterr);END;";
    
//echo $sql;
    
$stmt OCIParse($conexion->conecta,$sql);
    
    
OCIBindByName($stmt,":po_muestrahistorial",&$po_muestrahistorial,-1,OCI_B_CURSOR);
    
OCIBindByName($stmt,":po_texterr",&$po_texterr,256);
    
OCIBindByName($stmt,":po_sw",&$po_sw,256);
    
ociexecute($stmt);
    
ociexecute($po_muestrahistorial);
    
ociexecute($po_texterr);
    
ociexecute($po_sw);
    
    while (
OCIFetchInto($po_muestrahistorial,&$data )) {
        echo 
" ID_ROLUNICO     : "$data[0] ."<br>";
        echo 
" USUARIO         : "$data[1]."<br>";
        echo 
" FISCALIA     : "$data[2]."<br>";
        echo 
" TIPOGESTION     : "strtoupper($data[3])."<br>";
        echo 
" FECGESTION    : "$data[4]."<br>";
        echo 
"<hr>";
    }
    
OCIFreeStatement($stmt);
    
OCIFreeCursor($po_muestrahistorial);
    

    
OCIFreeStatement($stmt);
    
$conexion->desconectar_ora();
}


?>