Código PHP:
<?php
$bd = "";
$conn = ocilogon("turnos", "turnos", $bd);
$curs = OCINewCursor($conn);
$stmt = OCIParse($conn,"begin PKG_GENERAL.PCN_CONSULTA_VEHICULOS(:friend_cv, :Mensaje); end;");
OCIBindByName($stmt,":Mensaje",&$gid,50);
OCIBindByName($stmt,":friend_cv",&$curs,-1,OCI_B_CURSOR);
//$gid=""; // for gid = 1 only
ociexecute($stmt);
ociexecute($curs);
while (OCIFetchInto($curs,&$friend_cv )) {
echo "<pre>";
print_r($friend_cv );
echo "</pre>";
}
OCIFreeStatement($stmt);
OCIFreeCursor($curs);
OCILogoff($conn);
?>
Warning: ocifetchinto(): OCIFetchInto: ORA-00932: tipos de dato inconsistentes: se esperaba %s se ha obtenido %s in c:\archivos de programa\easyphp1-7\www\turnos\turnos4.php on line 17