|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-10-26 09:37 UTC] cmb@php.net
-Package: PDO related
+Package: PDO_INFORMIX
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 05:00:01 2025 UTC |
Description: ------------ When I write a Statement: select 'a', tabname, 'b' from systables; I execute the the statement with ..->query() and fetch with PDO::FETCH_ASSOC, then the first and the third column has as name '' and the third column overwrites the first in the resulting row-array. Test script: --------------- <?PHP $db = new PDO("informix:host=<hostname>; service=<port>; database=sysmaster; server=<INFORMIXSERVER>; protocol=onsoctcp; EnableScrollableCursors=1", "informix", "<userpassword>"); $stmt = $db->query("select 'a', tabname, 'b' from systables"); $i = 1; while ($row = $stmt->fetch(PDO::FETCH_ASSOC) ) { print_r($row); if ( $i++ > 4 ) break; } ?> Expected result: ---------------- The expression columns must be named unique by example expr1, expr2, ... expr<n>. Actual result: -------------- Array ( [] => b [TABNAME] => systables ) Array ( [] => b [TABNAME] => syscolumns ) Array ( [] => b [TABNAME] => sysindices ) Array ( [] => b [TABNAME] => systabauth ) Array ( [] => b [TABNAME] => syscolauth )