For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > September 2004 > Re: [PHP-DB] Possible bug in mysql_fetch_array et al









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Possible bug in mysql_fetch_array et al
John Holmes

2004-09-22, 8:57 pm

Daniel Watrous wrote:

> 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.


Maybe this is a character set problem? MySQL may be returning data in a
certain character set that PHP is interpreting differently or doesn't
understand (or your browser can't display it?).

Are you _sure_ nothing else is happening with the array or result set
that could be doing this? Can you reduce it down to a couple lines of
code and still reproduce this?

--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com