Bug #51009 [Fbk->NoF]: PDO with pgsql returning NULL when integer expected in prepared query
| From: | php-bugs at lists dot php dot net | Date: | Mon, 18 Feb 2013 00:34:07 +0000 |
| Subject: | Bug #51009 [Fbk->NoF]: PDO with pgsql returning NULL when integer expected in prepared query | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176803@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=51009&edit=1
ID: 51009
Updated by: php-bugs@lists.php.net
Reported by: peter at allicient dot co dot uk
Summary: PDO with pgsql returning NULL when integer expected in
prepared query
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: PDO related
Operating System: FreeBSD 8.0
PHP Version: 5.2.12
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2011-11-15 12:05:44] felipe@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2010-02-11 03:27:00] peter at allicient dot co dot uk
Description:
------------
When using a prepared SELECT query of the form "SELECT table_a.column_id,
table_a.column_some_string FROM table_a LEFT OUTER JOIN table_b ON (table_a.column_id =
table_b.foreign_key_id)" - which executes successfully - there is a problem fetching the
results.
Using fetchAll( PDO::FETCH_ASSOC ) returns the rows with the strings intact but the column_id
(integer) as NULL. PDO::FETCH_BOTH shows that numerically indexed rows have the column_id as
expected but the error still present when indexed by the column name.
The same query performed via pgadmin3 returns the expected results, and is the same as
PDO::FETCH_NUM so there is definitely a problem with PDO::FETCH_ASSOC.
Other SELECT queries work as expected, it seems to be related to the "LEFT OUTER JOIN".
It can be coded around but is nonetheless a curious error.
Expected result:
----------------
For the PDO::FETCH_ASSOC to return the same data as PDO::FETCH_NUM.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=51009&edit=1