Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003202 [Quercus] minor always 12-29-08 11:32 07-18-23 02:09
Reporter lzymll View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 3.1.8
Summary 0003202: Mysql PDO fetch bug
Description when query "select id,majorname as name from category"

$array = $PDO->fetch(PDO::fetch_assoc)

can't find $array["name"], still is original table column name. and column name case won't change.

Additional Information
Attached Files

- Relationships

- Notes
(0003684)
lzymll
12-29-08 16:11

Fixed,Using MySQL Connector/J 5.0

MySQL Connector/J 5.1 is not working
 
(0005099)
jamesdlow
03-01-11 19:55

Using 5.0 fixed it for me. I remember having this problem even when just using JDBC from within Java with some versions of MySQL connector.
 
(0005100)
jamesdlow
03-01-11 20:11

This link shows what changed between 5.0 and 5.1:
http://bugs.mysql.com/bug.php?id=48947 [^]

It seems that getColumnName / getColumnLabel return different things in 5.1 and
com.caucho.quercus.lib.db.PDOStatement seems to use getColumnName. Maybe it should be changed to use getColumnLabel? This is what I've done in my Java only projects in the past.
 

- Issue History
Date Modified Username Field Change
12-29-08 11:32 lzymll New Issue
12-29-08 16:11 lzymll Note Added: 0003684
02-28-11 07:30 jamesdlow Issue Monitored: jamesdlow
03-01-11 19:55 jamesdlow Note Added: 0005099
03-01-11 20:11 jamesdlow Note Added: 0005100
03-02-11 02:01 kdecherf Issue Monitored: kdecherf
07-18-23 02:09 WilliamThompson Note Added: 0007217
11-14-23 17:33 ferg Note Deleted: 0007217


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
40 total queries executed.
31 unique queries executed.
Powered by Mantis Bugtracker