ID:               17908
 Comment by:       tumman at sec dot or dot th
 Reported By:      ThorpeJ at gao dot gov
 Status:           Assigned
 Bug Type:         OCI8 related
 Operating System: Linux 7.1
 PHP Version:      4.0CVS-2002-06-21
 Assigned To:      maxim
 New Comment:

Your fix It still not work.


Previous Comments:
------------------------------------------------------------------------

[2002-10-20 15:33:55] [EMAIL PROTECTED]

true,

actually, what i noticed is that if you do a fetch *before* calling
OCIColumnIsNULL() you then get the right results.

/******************************************************/
$conn = OCILogon($user, $pwd, $db);
$stmt = OCIParse($conn, "select * from $table");
OCIExecute($stmt);
$nrows = OCIFetchStatement($stmt, $res);  // adding this
$ncols = OCINumCols($stmt);
for ( $i = 1; $i <= $ncols; $i++ ) {
  echo "NAME: " . OCIColumnName($stmt,$i) . "<BR>";
  echo "TYPE: " . OCIColumnType($stmt,$i) . "<BR>";
  echo "SIZE: " . OCIColumnSize($stmt,$i) . "<BR>";
  echo "ISNULL: " . OCIColumnIsNULL($stmt,$i) . "<P>"; //Function does
not return any information
}
/******************************************************/

Will go to fix that.

------------------------------------------------------------------------

[2002-06-21 14:20:29] ThorpeJ at gao dot gov

I've tried using OCIColumnIsNULL() to retrieve info on which fields
were NULL/NOT NULL in an Oracle database table, and the function did
not return anything (using OCIColumnName, OCIColumnType, and
OCIColumnSize in the same program worked fine). The script below is a
simple example:

/******************************************************/
$conn = OCILogon($user, $pwd, $db);
$stmt = OCIParse($conn, "select * from $table");
OCIExecute($stmt);
$ncols = OCINumCols($stmt);
for ( $i = 1; $i <= $ncols; $i++ ) {
  echo "NAME: " . OCIColumnName($stmt,$i) . "<BR>";
  echo "TYPE: " . OCIColumnType($stmt,$i) . "<BR>";
  echo "SIZE: " . OCIColumnSize($stmt,$i) . "<BR>";
  echo "ISNULL: " . OCIColumnIsNULL($stmt,$i) . "<P>"; //Function does
not return any information
}
/******************************************************/

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=17908&edit=1

Reply via email to