Pbs with Oracle

From: Date: Tue, 05 Feb 2002 10:53:54 +0000
Subject: Pbs with Oracle
Groups: php.db 
Request: Send a blank email to php-db+get-6393@lists.php.net to get a copy of this message
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

« previous php.db (#6393) next »