|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3889 sybase_fetch_array returns a single space instead of empty strings
Submitted: 2000-03-21 12:09 UTC Modified: 2000-07-27 08:36 UTC
From: k at les dot cz Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.0 Latest CVS (21/03/2000) OS: redhat 6.1 (kernel 2.2.12)
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: k at les dot cz
New email:
PHP Version: OS:


 [2000-03-21 12:09 UTC] k at les dot cz
sybase_fetch_array returns a single space instead
of empty strings.

1, sql commands
create table test (name text)
-- inserting an empty string
insert into test ('')

2, php script:
# first connect, select...
$query  = "SELECT * FROM test";
$rc = sybase_query($query, $link);
while ($a = sybase_fetch_array($rc)) {
        printf("<TT>'%s'</TT><BR>\n", $a['name']);

3, output of this script:
' '
(one space)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-22 04:05 UTC] joey at cvs dot php dot net
Change printf() to var_dump($a)
What result do you get?
 [2000-07-27 00:43 UTC]
Has any progress been made on this bug report?
 [2000-07-27 08:36 UTC]
This is the proper behavior. Sybase is at fault here,
not PHP. Try the following from isql to see this:
create table test (name varchar(15) null)

insert test values ("")

insert test values (NULL)

select * from test

select 'x'+name+'x' from test

(Thanks to for the answer
and test case.)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 21 09:01:28 2024 UTC