Possible bug in mysql_fetch_array et al

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My understanding of mysql_fetch_array () is that when supplied with one value only (a result_set) this will return an array indexed both numerically and associatively by field name. The result set would take the form:
array(59) {
[0]=>
string(4) "9542"
["ORDER_ID"]=>
string(4) "9542"
..
Where both the [0] and ["ORDER_ID"] indexes should contain the same value.
If my understanding is correct then I have found some aberrant behavior in the return of a particular result_row. Unlike the above the array contains different values for numeric and associative indexes. Furthermore the associative value contains an uncommon character. Example below:
array(59) {
[0]=>
string(4) "9542"
["ORDER_ID"]=>
string(4) "31[]3"
..
In the above var_dump the [] actually appears as a small box and I cannot copy and paste it. The numerically indexed value (i.e. [0]=>string(4) "9542") is correct. The associatively indexed value (i.e. ["ORDER_ID"]=>string(4) "31[]3") is completely bogus. Has anyone else seen this behavior? Is there a fix for it? Any pointers would be appreciated...


I have tried adding a value MYSQL_ASSOC to the mysql_fetch_array and I have tried using mysql_fetch_assoc. Both return the same bogus value.

Daniel Watrous

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux