#47189 [NEW]: oci_fetch_all() returns empty arrays on subsequent call on a given statement
From: pcdinh at gmail dot com
Operating system: Windows XP SP2
PHP version: 5.3.0alpha3
PHP Bug Type: OCI8 related
Bug description: oci_fetch_all() returns empty arrays on subsequent call on a given statement
Description:
------------
I don't know if it is a documentation problem or OCI8-related bug. I
find that oci_fetch_all() always returns empty arrays on subsequent
calls on the same statement handler. PHP Manual does not say anything
about it.
Reproduce code:
---------------
<?php
include_once './dbconfig.php'; // $config is defined here
$connection = oci_connect($config['dbuser'], $config['dbpassword'],
$config['db']);
$stmt = oci_parse($connection, "SELECT 1 FROM dual WHERE 1 =
:value");
$i = 1;
oci_bind_by_name($stmt, ':value', $i, -1, SQLT_INT);
oci_execute($stmt);
oci_fetch_all($stmt, $rs, 0, -1, OCI_FETCHSTATEMENT_BY_ROW);
var_dump($rs).'<br />'; // full-data array
oci_fetch_all($stmt, $rs1, 0, -1, OCI_FETCHSTATEMENT_BY_ROW);
var_dump($rs1); // empty array
oci_free_statement($stmt);
oci_close($connection);
?>
Expected result:
----------------
If it is OCI8-related bug, oci_fetch_all should return the same data
array on multiple calls.
If it is an undocumented behavior, could you please add a
note about it in PHP Manual ?
Actual result:
--------------
oci_fetch_all() always returns empty arrays on subsequent calls on
the same statement handler
--
Edit bug report at http://bugs.php.net/?id=47189&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47189&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47189&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47189&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47189&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47189&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47189&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47189&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47189&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47189&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47189&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47189&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47189&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47189&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47189&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47189&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47189&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47189&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47189&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47189&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47189&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47189&r=mysqlcfg
Thread (1 message)
- pcdinh at gmail dot com