Hi everybody,

Still with the same configuration (Apache1.3.14 + PHP4.04pl1
+ support for Oracle
8.0.5 with OCI, all on HP-UX 11), I manage to connect to my
base (ocilogon, ociparse and ociexecute).
After that, whenever I try to get the results, it prints
well the column name but not the data. I try with the three
possibilities : ocifetch, ocifetchinto and
ocifetchstatement.

Here an example :

<?
$uid = "XXXX";
$pwd = "YYYY";
$inst = "MY_INSTANCE";

$conn = ocilogon ($uid, $pwd, $inst) or die ("ocilogon
failed\n");

$query= "select OWNER, TABLE_NAME from ALL_TABLES";
$stmt = ociparse ($conn, $query) or die ("ociparse
failed\n");
ociexecute ($stmt) or die ("ociexecute failed" );

while ( OCIFetch($stmt) ) {
    $ncols = OCINumCols($stmt);
    for ( $i = 1; $i <= $ncols; $i++ ) {
        $column_name  = OCIColumnName($stmt, $i);
        $column_value = OCIResult($stmt, $i);
        print $column_name . " : " . $column_value . "\n";
    }
}
?>

Any suggestion is welcome...

Emmmanuel Nectoux

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to