#45458 [Opn]: oci_fetch_all add NULL char to field name when field name is numeric
by Leopoldo Dot Donati At Gmail Dot Com other posts by this author
Jul 8 2008 8:29AM messages near this date
#45458 [Opn->Asn]: oci_fetch_all add NULL char to field name when field name is numeric
|
[PHP-DEV] [PATCH] ext/date tzinfo structure references
ID: 45458
User updated by: leopoldo dot donati at gmail dot com
Reported By: leopoldo dot donati at gmail dot com
Status: Open
Bug Type: OCI8 related
Operating System: Linux RHAS4
PHP Version: 5.2.6
New Comment:
I meant
$nr = oci_fetch_all($statID, $data, 0, -1, OCI_FETCHSTATEMENT_BY_ROW);
Previous Comments:
------------------------------------------------------------------------
[2008-07-08 15:14:56] leopoldo dot donati at gmail dot com
Description:
------------
Server: Oracle9i Enterprise Edition Release 9.2.0.7.0
Client: instant client 10.1.0.3
let's suppose we have a table (t) with 3 columns (a, b, c)
and you want to execute the statement:
select a "10", b "20", c "30" from t
if you parse, execute and then get the records like this:
while ($row = oci_fetch_array($statID, OCI_ASSOC)) $data[] = $row;
when you look at $data[0]["10"] there is a value
if you parse, execute and get the records with oci_fetch_all
$data = oci_fetch_all($statID, $data, 0, -1,
OCI_FETCHSTATEMENT_BY_ROW)
if you print_r $data it looks the same but you can't access
$data[0]["10"] because there is a NULL after the 10 (at least trying and
ord looks like)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45458&edit=1
Thread:
Leopoldo Dot Donati At Gmail Dot Com
sixd
johannes
Leopoldo Dot Donati At Gmail Dot Com
|