From: charlie at strausesoftware dot com Operating system: Windows 2000 PHP version: 5.2.5 PHP Bug Type: ODBC related Bug description: Problem when using SQL_CUR_USE_ODBC on connec
Description: ------------ I'm using PHP with Apache. PHP code connects to MS SQL server using ODBC. I'm doing a query against a table that is very simple: one column of the real data type, one of the text data type. The text field is set to "testing 1,2,3". The real column is set to 10.0199995. When I use the default connect options, I get both values back fine. When I use SQL_CUR_USE_ODBC, which I very much want to use, then the text column data comes back as boolean(false). Reproduce code: --------------- Table: CREATE TABLE [dbo].[test1]( [ID] [int] IDENTITY(1,1) NOT NULL, [real1] [real] NULL, [text1] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL, CONSTRAINT [PK_test1] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] Insert 1 row where text1 is set to "testing 1,2,3" and real1 is set to 10.0199995. Code: <?php $conn = odbc_connect(db-name, user-name,password, SQL_CUR_USE_ODBC); $result = odbc_exec($conn, "select * from test1"); if (odbc_fetch_row($result)) { print "Values: " . odbc_result($result,"real1") . "," . odbc_result($result,"text1"); } ?> Expected result: ---------------- Values: 10.02,testing 1,2,3 Actual result: -------------- Values: 10.02, -- Edit bug report at http://bugs.php.net/?id=44618&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44618&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44618&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44618&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44618&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44618&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44618&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44618&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44618&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44618&r=support Expected behavior: http://bugs.php.net/fix.php?id=44618&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44618&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44618&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44618&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44618&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44618&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44618&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44618&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44618&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44618&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44618&r=mysqlcfg