|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-10 22:20 UTC] wez@php.net
[2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 03:00:01 2025 UTC |
Description: ------------ I'm tring to get information from an access database using a join of 2 tables. The columns used in the join condition is returned by PHP incorrectly. On small datasets everything works fine. For larger datasets the bug always occurs. I have already compacted/repaired the database, this is not the problem. The query works fine in actual access database. for now fetching by column number will work but fetching associative does not Thanks, Jordan Note: This bug is on PHP 5.1.4, for some reason I can't select a 5.1.4 version in the dropdown. Reproduce code: --------------- $dsn = "odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\\test.mdb"; $DB = new PDO($dsn, null, null); $SQL = "SELECT * FROM A inner JOIN B ON A.AID = B.AID;"; $res = $DB->query($SQL); foreach($res->fetchAll(PDO::FETCH_ASSOC) as $row) print_r($row); Expected result: ---------------- Array ( [AID] => 1 [INFO] => info [BID] => 2 [DATA] => data ) ...etc... Actual result: -------------- Array ( [AID] => [INFO] => info [BID] => 2 [DATA] => data ) ...etc... none of the returned arrays contain AID if $res->fetchAll() is used we instead get the following: Array ( [AID] => [0] => 1 [INFO] => info [1] => info [BID] => 2 [2] => 2 [3] => 1 [DATA] => data [4] => data ) ...etc...