Date: 11/30/99
- Next message: Bug Database: "[PHP-DEV] Bug #2879 Updated: Tinyint and bit fields return extra garbage on Sybase ASE on Linux and MS SQL 6"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #2877 Updated: gcc runs out of memory compiling zend_execute.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: adam_wilkinson <email protected>
Operating system: Linux 2.2.5
PHP version: 3.0.12
PHP Bug Type: Sybase (dblib) related
Bug description: Tinyint and bit fields return extra garbage on Sybase ASE on Linux and MS SQL 6
Create a table that contains a tinyint and/or a bit:
create table TestTab(ID varchar(10), Verified bit, Slot tinyint)
If you return the bit or tinyint fields, you get garbage appended to the end. This is the same on MS SQL Server 6.5 on NT as well as Sybase ASE 11.0.3 for Linux (The free unsupported one).
You can work around it by converting the results to a varchar field, then you can read them normally.
So you can use:
SELECT ID, CONVERT(char(1), Verified) AS Verified,
CONVERT(varchar(2), Slot) AS Slot FROM TestTab
Instead of:
SELECT * FROM TestTab;
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Bug Database: "[PHP-DEV] Bug #2879 Updated: Tinyint and bit fields return extra garbage on Sybase ASE on Linux and MS SQL 6"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #2877 Updated: gcc runs out of memory compiling zend_execute.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

