Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003202 [Quercus] minor always 12-29-08 11:32 03-01-11 20:11
Reporter lzymll View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 3.1.8
  Product Build
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.

Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
12-29-08 16:11

Fixed,Using MySQL Connector/J 5.0

MySQL Connector/J 5.1 is not working
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.
03-01-11 20:11

This link shows what changed between 5.0 and 5.1: [^]

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

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