|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #641 Extra whitespace when SELECTing a text field
Submitted: 1998-08-10 14:24 UTC Modified: 1998-08-13 16:02 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: cbi at allgaeu dot org Assigned:
Status: Closed Package: Sybase (dblib) related
PHP Version: 3.0.2a OS: Linux 2.0.34
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: cbi at allgaeu dot org
New email:
PHP Version: OS:


 [1998-08-10 14:24 UTC] cbi at allgaeu dot org
I noticed that sometimes PHP seems to append some extra whitespace to fields selected from a MS-SQL-database. I wasn't able to find out WHY it happens, but I am pretty sure I am able to reproduce this behavior.

Sybase Open/C client 10.0.3, Apache 1.3.1

The problem: I SELECT a field from the Database:

$res = sybase_query("select name from item",$db);
$result = sybase_fetch_array($res);

and when I try $result["name"] or $result[0] it contains

"blbla                          " <--- extra whitespace

I am sure that there are no blanks behind the words in the database. The length of the whole string is IMHO approximately equal to the length of the field in the database.  It is a littel bit strange that it happens only sometimes but when it happens, I can always reproduce it. When SELECTing more than one row not every field has extra whitespace. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-08-13 16:02 UTC] zeev
No response from the user.
This is standard SQL behavior.  If this doesn't seem right, please get back to us at
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Oct 24 18:01:28 2020 UTC