php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41399 PDO don't read ODBC TEXT column
Submitted: 2007-05-15 14:28 UTC Modified: 2009-05-03 01:00 UTC
Votes:5
Avg. Score:4.6 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:3 (75.0%)
From: geniuz at geniuz dot cz Assigned: wez (profile)
Status: No Feedback Package: PDO related
PHP Version: 5.2.2 OS: XP
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: geniuz at geniuz dot cz
New email:
PHP Version: OS:

 

 [2007-05-15 14:28 UTC] geniuz at geniuz dot cz
Description:
------------
I have column type TEXT.
When I read it over odbc_result, it works fine.
When I read it over PDO, column is empty.
More, all next readed columns after this column are empty too.
For example: SELECT ID, CSN, Spec FROM MYTABLE
When CSN column type is TEXT, I obtain empty data for CSN a Spec columns.
I have downloaded http://snaps.php.net/win32/php5.2-win32-latest.zip
before I send this bug.

Reproduce code:
---------------
if($sth = $pdo->query( "SELECT ID, CSN, Spec FROM MYTABLE" ))
{
	while( ($row = $sth->fetch(PDO::FETCH_NUM)) )
	{
		echo "ID:".$row[0]."<BR>";
		echo "CSN:".$row[1]."<BR>";
		echo "Spec:".$row[2]."<BR>";
	}
}


Expected result:
----------------
Not empty $row[1] and $row[2]

Actual result:
--------------
Empty $row[1] and $row[2]

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-15 15:22 UTC] geniuz at geniuz dot cz
I found now that I can't call odbc_result function more than one time, only first call return me data from TEXT type column.
So it is possible that PDO implements more than one call of odbc_result for TEXT type columns...?
 [2009-04-25 14:45 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-05-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Dec 03 11:00:01 2025 UTC