Req #81550 [NEW]: getColumnMeta returns aliases of tables and fields instead of the base names.
| From: | daniel dot garcia dot fidalgo at gmail dot com | Date: | Thu, 21 Oct 2021 17:31:20 +0000 |
| Subject: | Req #81550 [NEW]: getColumnMeta returns aliases of tables and fields instead of the base names. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-237329@lists.php.net to get a copy of this message | ||
From: daniel dot garcia dot fidalgo at gmail dot com
Operating system: CentOS 7
PHP version: 7.3.31
Package: PDO MySQL
Bug Type: Feature/Change Request
Bug description:getColumnMeta returns aliases of tables and fields instead of the base names.
Description:
------------
getColumnMeta() function returns aliases of tables and fields instead of
the base names.
Test script:
---------------
Original query:
SELECT
FormuId AS FormuId__FormId__V,
Formdate AS Formdate__Date__v,
GROUP_CONCAT(FieldValue ORDER BY id_sysformdb) AS Contact__v
FROM
Sysformdb AS F
WHERE
(F.Fieldname = 'frm_fld_Name' OR
F.Fieldname = 'frm_fld_Lastname' OR
F.FieldName = 'frm_fld_E-mail')
GROUP BY
FormuId
ORDER BY
id_sysformdb
DESC LIMIT 50
getColumnMeta() returned data:
array(7) { ["native_type"]=> string(6) "STRING" ["pdo_type"]=>
int(2)
["flags"]=> array(0) { } ["table"]=> string(1) "F"
["name"]=> string(9)
"FormId__V" ["len"]=> int(30) ["precision"]=> int(0) }
array(7) { ["native_type"]=> string(9) "TIMESTAMP"
["pdo_type"]=> int(2)
["flags"]=> array(0) { } ["table"]=> string(1) "F"
["name"]=> string(7)
"Date__v" ["len"]=> int(19) ["precision"]=> int(0) }
array(7) { ["native_type"]=> string(4) "BLOB" ["pdo_type"]=>
int(2)
["flags"]=> array(1) { [0]=> string(4) "blob" } ["table"]=>
string(0) ""
["name"]=> string(10) "Contact__v" ["len"]=> int(50331645)
["precision"]=> int(0) }
Expected result:
----------------
The base name of tables and fields is expected as named in the db schema
Actual result:
--------------
The aliased names as set in the query are returned.
--
Edit bug report at https://bugs.php.net/bug.php?id=81550&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81550&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81550&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81550&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81550&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81550&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81550&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81550&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81550&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81550&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81550&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81550&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81550&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81550&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81550&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81550&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81550&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81550&r=mysqlcfg