ID:               37487
 Updated by:       [EMAIL PROTECTED]
 Reported By:      cjbj at hotmail dot com
-Status:           Open
+Status:           Closed
 Bug Type:         OCI8 related
 Operating System: n/a
 PHP Version:      5.1.4
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




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

[2006-05-18 04:32:43] cjbj at hotmail dot com

Description:
------------
The array type for oci_fetch_array() should always default to OCI_BOTH
unless explicitly changed.  For example, currently
  oci_fetch_array($s)
is equivalent to
  oci_fetch_array($s, OCI_BOTH)

I'm saying that
  oci_fetch_array($s, OCI_RETURN_NULLS)
should be equivalent to
  oci_fetch_array($s, OCI_RETURN_NULLS+OCI_BOTH)
At the moment it is equivalent to
  oci_fetch_array($s, OCI_RETURN_NULLS+OCI_NUM)
which is (i) not documented (ii) harder to understand and document.


Reproduce code:
---------------
<?php
$c = oci_connect("hr", "hr", "//localhost/XE");
$s = oci_parse($c, "select * from dual");
oci_execute($s);
while ($res = oci_fetch_array($s, OCI_RETURN_NULLS)) {
  echo "<pre>"; var_dump($res); echo "</pre>";
}
oci_execute($s);
while ($res = oci_fetch_array($s)) {
  echo "<pre>"; var_dump($res); echo "</pre>";
}
  oci_close($c);
?>

Expected result:
----------------
  array(2) {
    [0]=>
    string(1) "X"
    ["DUMMY"]=>
    string(1) "X"
  }

  array(2) {
    [0]=>
    string(1) "X"
    ["DUMMY"]=>
    string(1) "X"
  }

Actual result:
--------------
  array(1) {
    [0]=>
    string(1) "X"
  }

  array(2) {
    [0]=>
    string(1) "X"
    ["DUMMY"]=>
    string(1) "X"
  }



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


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

Reply via email to