#38834 [NEW]: pdo_odbc

From: Date: Thu, 14 Sep 2006 17:59:14 +0000
Subject: #38834 [NEW]: pdo_odbc
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-102198@lists.php.net to get a copy of this message
From: aspen dot olmsted at alliance dot biz Operating system: Windows XP SP2 PHP version: 5.1.6 PHP Bug Type: PDO related Bug description: pdo_odbc Description: ------------ I am connecting to sql with and retrieving a single row with 3 columns. One column is a 8000 varchar. If I put the other two columns before the large varchar everything is fine. If I put them after they come back empty. Reproduce code: --------------- $dbh = new PDO('odbc:lcpeo', 'user', 'password'); $sql = "SELECT scpFreeText, scpLastUpdate,scpName FROM ScreenParts WHERE scpCode = 1541"; foreach($dbh->query($sql) as $row) { var_dump($row); } $dbh = null; Here is the table definition: CREATE TABLE [ScreenParts] ( [scpCode] [int] NOT NULL CONSTRAINT [DF_ScreenParts_scpCode] DEFAULT (0), [scpScreenCode] [int] NOT NULL CONSTRAINT [DF_ScreenParts_scpScreenCode] DEFAULT (0), [scpScreenName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_ScreenParts_scpScreenName] DEFAULT (''), [scpName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_ScreenParts_scpName] DEFAULT (''), [scpType] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_ScreenParts_scpType] DEFAULT (''), [scpFileName] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_ScreenParts_scpFileName] DEFAULT (''), [scpParameters] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_ScreenParts_scpParameters] DEFAULT (0), [scpTOP] [int] NOT NULL CONSTRAINT [DF_ScreenParts_scpTOP] DEFAULT (0), [scpLEFT] [int] NOT NULL CONSTRAINT [DF_ScreenParts_scpLEFT] DEFAULT (0), [scpWIDTH] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_ScreenParts_scpWIDTH] DEFAULT (''), [scpHEIGHT] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_ScreenParts_scpHEIGHT] DEFAULT (''), [scpFreeText] [varchar] (8000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_ScreenParts_scpFreeText] DEFAULT (''), [scpIncBefore] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_ScreenParts_scpIncBefore] DEFAULT (''), [scpIncAfter] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_ScreenParts_scpIncAfter] DEFAULT (''), [scpOrdinal] [int] NOT NULL CONSTRAINT [DF_ScreenParts_scpOrdinal] DEFAULT (0), [scpStatus] [int] NOT NULL CONSTRAINT [DF_ScreenParts_scpStatus] DEFAULT (1), [scpExtras] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_ScreenParts_scpExtras] DEFAULT (''), [scpExtraLngCode] [int] NOT NULL CONSTRAINT [DF_ScreenParts_scpExtraLngCode] DEFAULT (0), [scpLastUpdate] [datetime] NOT NULL CONSTRAINT [DF_ScreenParts_scpLastUpdate] DEFAULT (getdate()), CONSTRAINT [PK_ScreenParts] PRIMARY KEY NONCLUSTERED ( [scpCode] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY] GO Expected result: ---------------- Values in all 3 fields Actual result: -------------- scpLastUpdate and scpName are empty -- Edit bug report at http://bugs.php.net/?id=38834&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38834&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38834&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38834&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38834&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38834&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38834&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38834&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38834&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38834&r=support Expected behavior: http://bugs.php.net/fix.php?id=38834&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38834&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38834&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38834&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38834&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38834&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38834&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38834&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38834&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38834&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38834&r=mysqlcfg

« previous php.bugs (#102198) next »