ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
#45458 [NEW]: 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:15AM messages near this date
#45459 [Opn->Asn]: date_create_from_format() fails on DATE_RFC3339 | #45458 [Asn->Csd]: oci_fetch_all add NULL char to field name when field name is numeric
From:             leopoldo dot donati at gmail dot com
Operating system: Linux RHAS4
PHP version:      5.2.6
PHP Bug Type:     OCI8 related
Bug description:  oci_fetch_all add NULL char to field name when field name is numeric

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 bug report at http://bugs.php.net/?id=45458&edit=1
-- 
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45458&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45458&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45458&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45458&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=45458&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45458&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45458&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45458&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45458&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45458&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=45458&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=45458&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45458&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45458&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45458&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45458&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45458&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45458&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45458&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45458&r=mysqlcfg
Thread:
Leopoldo Dot Donati At Gmail Dot Com
sixd
johannes
Leopoldo Dot Donati At Gmail Dot Com

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved