|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57289 Long ntext fields cause empty result fields
Submitted: 2006-10-10 15:05 UTC Modified: 2006-10-10 22:17 UTC
From: mike at pixor dot net Assigned: wez (profile)
Status: Closed Package: PDO_ODBC (PECL)
PHP Version: 5.1.6 OS: Windows XP SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mike at pixor dot net
New email:
PHP Version: OS:


 [2006-10-10 15:05 UTC] mike at pixor dot net
I'm working with a SQL Server 2005 Express database, trying to access data that has multiple ntext fields containing product descriptions in various languages.  I am able to access this data using odbc_connect() and odbc_exec(), but came across this bug when using PDO methods.  If I SELECT a field with type ntext, any fields I SELECT after this will be empty.  For example, using this SELECT statement where name is varchar(255) and description is ntext, I would have both name and description in my result:

SELECT name, description FROM test_tbl

however, this statement would return description but name would be empty:

SELECT description, name FROM test_tbl

I've attached a URL to some example code that will reproduce this bug, at least on my system using SQL Server 2005 Express.

Reproduce code:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-10 22:17 UTC]
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

Fix will be in PHP 5.2, and should show up in the next stable snapshot.
Thanks for the self-contained test case.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun May 16 05:01:23 2021 UTC