#28204 [Opn->Asn]: Problem with BIT field type with MSSQL (freetds 0.62.3)

From: Date: Thu, 29 Apr 2004 13:27:34 +0000
Subject: #28204 [Opn->Asn]: Problem with BIT field type with MSSQL (freetds 0.62.3)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-58997@lists.php.net to get a copy of this message
ID: 28204 Updated by: iliaa@php.net Reported By: johann at infomaniak dot ch -Status: Open +Status: Assigned Bug Type: Sybase (dblib) related Operating System: Linux PHP Version: 4.3.6 -Assigned To: +Assigned To: fmk Previous Comments: ------------------------------------------------------------------------ [2004-04-28 14:01:12] johann at infomaniak dot ch Description: ------------ The return value is the real value + a lot of space character (it is converted to a string with a constant length) maybe the problem come from freetds dbconvert. I have this problem since php 4.3.4 and in php 4.3.4 I applyed the following patch. diff -ruP php-4.3.4/ext/sybase/php_sybase_db.c php-4.3.4.patched/ext/sybase/php_sybase_db.c --- php-4.3.4/ext/sybase/php_sybase_db.c 2003-10-16 06:24:04.000000000 +0200 +++ php-4.3.4.patched/ext/sybase/php_sybase_db.c 2004-01-29 11:51:41.000000000 +0100 @@ -680,6 +680,7 @@ switch (column_type) { + case SYBBIT: case SYBINT2: case SYBINT4: { Z_LVAL_P(result) = (long) anyintcol(offset); @@ -893,6 +894,7 @@ case SYBINT4: case SYBFLT8: case SYBREAL: + case SYBBIT: result->fields[i].numeric = 1; break; case SYBCHAR: Expected result: ---------------- an integer for example 0 Actual result: -------------- a string with constant length for example "0 " ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28204&edit=1

« previous php.bugs (#58997) next »