Hi all

Here is a test version of my script. It queries the data dictionary view 
ALL_SOURCE. In sqlplus it returns all souce code in the database. In php it 
returns no rows.

The only odd thing about it is that ALL_SOURCE.TYPE is VARCHAR2(12), and 
'PACKAGE BODY' is twelve characters long. When I change 'PACKAGE BODY' to 
'PACKAGE', it does return rows.

<?php
error_reporting(E_ALL);
$oradb = OCILogon('****','****','****');

$packageStmt = OCIParse($oradb,
    "SELECT * FROM ALL_SOURCE WHERE TYPE = 'PACKAGE BODY'");
OCIExecute($packageStmt);
if(OCIFetchInto($packageStmt,$aLine,OCI_ASSOC)) {
  echo "Cool Bananas\n";
  var_dump($aLine);
} else {
  echo "No Bananas\n";
}

OCILogoff($oradb);
?>

Im using PHP 4.3.2 Linked to Oracle 9.2.0.1.0 libraries connecting to oracle 
9.2.0.1.0 database on another machine. Can someone confirm it is only me?

Lang


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to