#31600 [Opn->Csd]: mysql_fetch_assoc returns strange chars as result indexes
| From: | mveutner at iptel-ulm dot de | Date: | Wed, 19 Jan 2005 14:05:14 +0000 |
| Subject: | #31600 [Opn->Csd]: mysql_fetch_assoc returns strange chars as result indexes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-72461@lists.php.net to get a copy of this message | ||
ID: 31600
User updated by: mveutner at iptel-ulm dot de
Reported By: mveutner at iptel-ulm dot de
-Status: Open
+Status: Closed
Bug Type: MySQL related
Operating System: Windows 2000 SP4
PHP Version: 5.0.3
New Comment:
I am very sorry! Daily maintance restarted server tonight and today:
All works fine.
Sorry for the trouble!
Previous Comments:
------------------------------------------------------------------------
[2005-01-18 18:29:07] mveutner at iptel-ulm dot de
Test page with more detailed results for this issue:
http://paracom.iptel-online.de/test.php
------------------------------------------------------------------------
[2005-01-18 17:57:49] mveutner at iptel-ulm dot de
Description:
------------
Hello,
searched the web, google, faqs, and lot more.
No result.
The problem:
Updated php4 last stable to php5 last stable.
Now every mysql_fetch_assoc($result) returns strange characters as
array index.
Tried to change libmysql.dll which was packed with php5 to the version
packed with mysql.
No result.
This problem does NOT happen when I execute a query with named columns
(SELECT
Name, Surname From customers).
My Configuration:
PHP 5.0.3
Apache Version Apache/1.3.33 (Win32) mod_ssl/2.8.22 OpenSSL/0.9.7e
Mysql Server: 4.1.7-nt
The complete environment (output of phpinfo()) can be found at:
http://paracom.iptel-online.de/info.php
Reproduce code:
---------------
$str_sql="SELECT * FROM customers";
$rs_res = mysql_query($str_sql, $conn) or die("Error in query 2
$str_sql" . mysql_error($conn));
$ln_res = mysql_fetch_assoc($rs_res)
Expected result:
----------------
print_r($ln_res) should look like:
array(Name=>value,Surname=>value ...)
Actual result:
--------------
Array ( [B] => 1 [@] => 99999 [] => 1 [] => 0000-00-00 )
This means: resulting array from mysql_fetch_assoc returns no more any
valid column names. Instead returning strange characters.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31600&edit=1