#40607 [NEW]: mssql_fetch_array concatinates spaces in middle of data

Ask a Question related to PHP Bugs, Design and Development.

  1. #1

    Default #40607 [NEW]: mssql_fetch_array concatinates spaces in middle of data

    From: Joe at sofusion dot com
    Operating system: FREE BSD 6.0
    PHP version: 5.2.1
    PHP Bug Type: MSSQL related
    Bug description: mssql_fetch_array concatinates spaces in middle of data

    Description:
    ------------
    When using mssql_fetch_arry and mssql_fetch_row, data returned that
    contains 2 spaces has been concatinated to one space. Example:
    Data returned should be "Two"' '' '"Spaces" (without quotes Two Spaces)
    But is returned as "Two"' '"Spaces" (without quotes -Two Spaces with one
    space between)

    FreeBSD WEBSERVER1.SOFUSION.local 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu
    Nov 3 09:36:13 UTC 2005 [email]root@x64.samsco.home[/email]:/usr/obj/usr/src/sys/GENERIC
    i386

    Build Date Feb 22 2007 19:36:38

    Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs'
    '--enable-versioning' '--with-mssql=/usr/local' '--enable-libxml'

    Library version FreeTDS



    Reproduce code:
    ---------------
    --MSSQL TABLE

    CREATE TABLE #T1( Name varchar(255),
    Number int )
    INSERT INTO #T1 VALUES('Two Spaces',1)
    INSERT INTO #T1 VALUES('One Spaces',2)


    --PHP CODE

    $sql = "select Name FROM Name_TBL WHERE Number = '1'";
    $rs = mssql_query($sql);
    $RT = mssql_fetch_array($rs);
    $Name= $RT[Name'];
    --This should have 2 spaces in it like the DB
    --But it only has one
    echo $Name




    Expected result:
    ----------------
    Two Spaces
    --This has 2 spaces between the words.

    Actual result:
    --------------
    Two Spaces
    --This only hase 1 space between the words

    --
    Edit bug report at [url]http://bugs.php.net/?id=40607&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40607&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40607&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40607&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40607&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=40607&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=40607&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40607&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=40607&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=40607&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=40607&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=40607&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=40607&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=40607&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40607&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=40607&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=40607&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40607&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=40607&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40607&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40607&r=mysqlcfg[/url]
    Joe at sofusion dot com Guest

  2. Similar Questions and Discussions

    1. #26012 [Bgs]: mssql_fetch_array
      ID: 26012 User updated by: boccara at netvision dot net dot il Reported By: boccara at netvision dot net dot il Status: ...
    2. #26012 [Com]: mssql_fetch_array
      ID: 26012 Comment by: jro at aucotec dot com Reported By: boccara at netvision dot net dot il Status: Bogus...
    3. #26012 [Opn->Bgs]: mssql_fetch_array
      ID: 26012 Updated by: iliaa@php.net Reported By: boccara at netvision dot net dot il -Status: Open +Status: ...
    4. #26012 [Fbk->Opn]: mssql_fetch_array
      ID: 26012 User updated by: boccara at netvision dot net dot il Reported By: boccara at netvision dot net dot il -Status: ...
    5. #26012 [Opn->Fbk]: mssql_fetch_array
      ID: 26012 Updated by: iliaa@php.net Reported By: boccara at netvision dot net dot il -Status: Open +Status: ...
  3. #2

    Default #40607 [Opn]: mssql_fetch_array concatinates spaces in middle of data

    ID: 40607
    User updated by: Joe at sofusion dot com
    Reported By: Joe at sofusion dot com
    Status: Open
    Bug Type: MSSQL related
    Operating System: FREE BSD 6.0
    PHP Version: 5.2.1
    New Comment:

    Sorry, dont use # in TBL Name. USE THIS DB CODE AND PHP CODE TO TEST:

    CREATE TABLE T1( Name varchar(255),
    Number int )
    INSERT INTO T1 VALUES('Two Spaces',1)
    INSERT INTO T1 VALUES('One Spaces',2)



    $sql = "SELECT Name FROM T1 WHERE Number = '1'";
    $rs = mssql_query($sql);
    while ($RT = mssql_fetch_array($rs))
    {$Name= $RT['Name'];
    //This should have 2 spaces in it like the DB
    //But it only has one
    echo ' <p>Name = '.$Name . '</p>';
    }


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-23 15:59:40] Joe at sofusion dot com

    Description:
    ------------
    When using mssql_fetch_arry and mssql_fetch_row, data returned that
    contains 2 spaces has been concatinated to one space. Example:
    Data returned should be "Two"' '' '"Spaces" (without quotes Two
    Spaces)
    But is returned as "Two"' '"Spaces" (without quotes -Two Spaces with
    one space between)

    FreeBSD WEBSERVER1.SOFUSION.local 6.0-RELEASE FreeBSD 6.0-RELEASE #0:
    Thu Nov 3 09:36:13 UTC 2005
    [email]root@x64.samsco.home[/email]:/usr/obj/usr/src/sys/GENERIC i386

    Build Date Feb 22 2007 19:36:38

    Configure Command './configure'
    '--with-apxs=/usr/local/apache/bin/apxs' '--enable-versioning'
    '--with-mssql=/usr/local' '--enable-libxml'

    Library version FreeTDS



    Reproduce code:
    ---------------
    --MSSQL TABLE

    CREATE TABLE #T1( Name varchar(255),
    Number int )
    INSERT INTO #T1 VALUES('Two Spaces',1)
    INSERT INTO #T1 VALUES('One Spaces',2)


    --PHP CODE

    $sql = "select Name FROM Name_TBL WHERE Number = '1'";
    $rs = mssql_query($sql);
    $RT = mssql_fetch_array($rs);
    $Name= $RT[Name'];
    --This should have 2 spaces in it like the DB
    --But it only has one
    echo $Name




    Expected result:
    ----------------
    Two Spaces
    --This has 2 spaces between the words.

    Actual result:
    --------------
    Two Spaces
    --This only hase 1 space between the words


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40607&edit=1[/url]
    Joe at sofusion dot com Guest

  4. #3

    Default #40607 [Opn->Bgs]: mssql_fetch_array concatinates spaces in middle of data

    ID: 40607
    Updated by: [email]fmk@php.net[/email]
    Reported By: Joe at sofusion dot com
    -Status: Open
    +Status: Bogus
    Bug Type: MSSQL related
    Operating System: FREE BSD 6.0
    PHP Version: 5.2.1
    New Comment:

    I'm unable to reproduce this (on Linux and WIndows with FreeTDS). Try
    viewing the result outside the browser, use <pre></pre> or get the
    length of the column to verify that you are getting the right results.


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-23 16:18:14] Joe at sofusion dot com

    Sorry, dont use # in TBL Name. USE THIS DB CODE AND PHP CODE TO TEST:

    CREATE TABLE T1( Name varchar(255),
    Number int )
    INSERT INTO T1 VALUES('Two Spaces',1)
    INSERT INTO T1 VALUES('One Spaces',2)



    $sql = "SELECT Name FROM T1 WHERE Number = '1'";
    $rs = mssql_query($sql);
    while ($RT = mssql_fetch_array($rs))
    {$Name= $RT['Name'];
    //This should have 2 spaces in it like the DB
    //But it only has one
    echo ' <p>Name = '.$Name . '</p>';
    }

    ------------------------------------------------------------------------

    [2007-02-23 15:59:40] Joe at sofusion dot com

    Description:
    ------------
    When using mssql_fetch_arry and mssql_fetch_row, data returned that
    contains 2 spaces has been concatinated to one space. Example:
    Data returned should be "Two"' '' '"Spaces" (without quotes Two
    Spaces)
    But is returned as "Two"' '"Spaces" (without quotes -Two Spaces with
    one space between)

    FreeBSD WEBSERVER1.SOFUSION.local 6.0-RELEASE FreeBSD 6.0-RELEASE #0:
    Thu Nov 3 09:36:13 UTC 2005
    [email]root@x64.samsco.home[/email]:/usr/obj/usr/src/sys/GENERIC i386

    Build Date Feb 22 2007 19:36:38

    Configure Command './configure'
    '--with-apxs=/usr/local/apache/bin/apxs' '--enable-versioning'
    '--with-mssql=/usr/local' '--enable-libxml'

    Library version FreeTDS



    Reproduce code:
    ---------------
    --MSSQL TABLE

    CREATE TABLE #T1( Name varchar(255),
    Number int )
    INSERT INTO #T1 VALUES('Two Spaces',1)
    INSERT INTO #T1 VALUES('One Spaces',2)


    --PHP CODE

    $sql = "select Name FROM Name_TBL WHERE Number = '1'";
    $rs = mssql_query($sql);
    $RT = mssql_fetch_array($rs);
    $Name= $RT[Name'];
    --This should have 2 spaces in it like the DB
    --But it only has one
    echo $Name




    Expected result:
    ----------------
    Two Spaces
    --This has 2 spaces between the words.

    Actual result:
    --------------
    Two Spaces
    --This only hase 1 space between the words


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40607&edit=1[/url]
    fmk@php.net Guest

  5. #4

    Default #40607 [Bgs]: mssql_fetch_array concatinates spaces in middle of data

    ID: 40607
    User updated by: Joe at sofusion dot com
    Reported By: Joe at sofusion dot com
    Status: Bogus
    Bug Type: MSSQL related
    Operating System: FREE BSD 6.0
    PHP Version: 5.2.1
    New Comment:

    When I use the <pre></pre> tags, It does display the correct data. Is
    this telling me that it is HTML that is concatinating the 2 spaces into
    one?
    Also you can use:
    $Name = str_replace (' ', ':', $RT['Name']);
    echo ' <p>Name2 = '.$Name . '</p>';
    to see the 2 spaces.

    When you duplicate the bug, do you have 2 spaces between the words in
    your browser?
    Thanks!!


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-23 19:29:07] [email]fmk@php.net[/email]

    I'm unable to reproduce this (on Linux and WIndows with FreeTDS). Try
    viewing the result outside the browser, use <pre></pre> or get the
    length of the column to verify that you are getting the right results.

    ------------------------------------------------------------------------

    [2007-02-23 16:18:14] Joe at sofusion dot com

    Sorry, dont use # in TBL Name. USE THIS DB CODE AND PHP CODE TO TEST:

    CREATE TABLE T1( Name varchar(255),
    Number int )
    INSERT INTO T1 VALUES('Two Spaces',1)
    INSERT INTO T1 VALUES('One Spaces',2)



    $sql = "SELECT Name FROM T1 WHERE Number = '1'";
    $rs = mssql_query($sql);
    while ($RT = mssql_fetch_array($rs))
    {$Name= $RT['Name'];
    //This should have 2 spaces in it like the DB
    //But it only has one
    echo ' <p>Name = '.$Name . '</p>';
    }

    ------------------------------------------------------------------------

    [2007-02-23 15:59:40] Joe at sofusion dot com

    Description:
    ------------
    When using mssql_fetch_arry and mssql_fetch_row, data returned that
    contains 2 spaces has been concatinated to one space. Example:
    Data returned should be "Two"' '' '"Spaces" (without quotes Two
    Spaces)
    But is returned as "Two"' '"Spaces" (without quotes -Two Spaces with
    one space between)

    FreeBSD WEBSERVER1.SOFUSION.local 6.0-RELEASE FreeBSD 6.0-RELEASE #0:
    Thu Nov 3 09:36:13 UTC 2005
    [email]root@x64.samsco.home[/email]:/usr/obj/usr/src/sys/GENERIC i386

    Build Date Feb 22 2007 19:36:38

    Configure Command './configure'
    '--with-apxs=/usr/local/apache/bin/apxs' '--enable-versioning'
    '--with-mssql=/usr/local' '--enable-libxml'

    Library version FreeTDS



    Reproduce code:
    ---------------
    --MSSQL TABLE

    CREATE TABLE #T1( Name varchar(255),
    Number int )
    INSERT INTO #T1 VALUES('Two Spaces',1)
    INSERT INTO #T1 VALUES('One Spaces',2)


    --PHP CODE

    $sql = "select Name FROM Name_TBL WHERE Number = '1'";
    $rs = mssql_query($sql);
    $RT = mssql_fetch_array($rs);
    $Name= $RT[Name'];
    --This should have 2 spaces in it like the DB
    --But it only has one
    echo $Name




    Expected result:
    ----------------
    Two Spaces
    --This has 2 spaces between the words.

    Actual result:
    --------------
    Two Spaces
    --This only hase 1 space between the words


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40607&edit=1[/url]
    Joe at sofusion dot com Guest

  6. #5

    Default #40607 [Bgs]: mssql_fetch_array concatinates spaces in middle of data

    ID: 40607
    Updated by: [email]fmk@php.net[/email]
    Reported By: Joe at sofusion dot com
    Status: Bogus
    Bug Type: MSSQL related
    Operating System: FREE BSD 6.0
    PHP Version: 5.2.1
    New Comment:

    This is a normal browser feature. The browser will reduce the
    whitespace (spaces, tabs new lines etc) to a single space. You could
    replace each space with &nbsp; if you want to force two spaces.


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-23 20:16:24] Joe at sofusion dot com

    When I use the <pre></pre> tags, It does display the correct data. Is
    this telling me that it is HTML that is concatinating the 2 spaces into
    one?
    Also you can use:
    $Name = str_replace (' ', ':', $RT['Name']);
    echo ' <p>Name2 = '.$Name . '</p>';
    to see the 2 spaces.

    When you duplicate the bug, do you have 2 spaces between the words in
    your browser?
    Thanks!!

    ------------------------------------------------------------------------

    [2007-02-23 19:29:07] [email]fmk@php.net[/email]

    I'm unable to reproduce this (on Linux and WIndows with FreeTDS). Try
    viewing the result outside the browser, use <pre></pre> or get the
    length of the column to verify that you are getting the right results.

    ------------------------------------------------------------------------

    [2007-02-23 16:18:14] Joe at sofusion dot com

    Sorry, dont use # in TBL Name. USE THIS DB CODE AND PHP CODE TO TEST:

    CREATE TABLE T1( Name varchar(255),
    Number int )
    INSERT INTO T1 VALUES('Two Spaces',1)
    INSERT INTO T1 VALUES('One Spaces',2)



    $sql = "SELECT Name FROM T1 WHERE Number = '1'";
    $rs = mssql_query($sql);
    while ($RT = mssql_fetch_array($rs))
    {$Name= $RT['Name'];
    //This should have 2 spaces in it like the DB
    //But it only has one
    echo ' <p>Name = '.$Name . '</p>';
    }

    ------------------------------------------------------------------------

    [2007-02-23 15:59:40] Joe at sofusion dot com

    Description:
    ------------
    When using mssql_fetch_arry and mssql_fetch_row, data returned that
    contains 2 spaces has been concatinated to one space. Example:
    Data returned should be "Two"' '' '"Spaces" (without quotes Two
    Spaces)
    But is returned as "Two"' '"Spaces" (without quotes -Two Spaces with
    one space between)

    FreeBSD WEBSERVER1.SOFUSION.local 6.0-RELEASE FreeBSD 6.0-RELEASE #0:
    Thu Nov 3 09:36:13 UTC 2005
    [email]root@x64.samsco.home[/email]:/usr/obj/usr/src/sys/GENERIC i386

    Build Date Feb 22 2007 19:36:38

    Configure Command './configure'
    '--with-apxs=/usr/local/apache/bin/apxs' '--enable-versioning'
    '--with-mssql=/usr/local' '--enable-libxml'

    Library version FreeTDS



    Reproduce code:
    ---------------
    --MSSQL TABLE

    CREATE TABLE #T1( Name varchar(255),
    Number int )
    INSERT INTO #T1 VALUES('Two Spaces',1)
    INSERT INTO #T1 VALUES('One Spaces',2)


    --PHP CODE

    $sql = "select Name FROM Name_TBL WHERE Number = '1'";
    $rs = mssql_query($sql);
    $RT = mssql_fetch_array($rs);
    $Name= $RT[Name'];
    --This should have 2 spaces in it like the DB
    --But it only has one
    echo $Name




    Expected result:
    ----------------
    Two Spaces
    --This has 2 spaces between the words.

    Actual result:
    --------------
    Two Spaces
    --This only hase 1 space between the words


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40607&edit=1[/url]
    fmk@php.net Guest

  7. #6

    Default #40607 [Bgs->Csd]: mssql_fetch_array concatinates spaces in middle of data

    ID: 40607
    User updated by: Joe at sofusion dot com
    Reported By: Joe at sofusion dot com
    -Status: Bogus
    +Status: Closed
    Bug Type: MSSQL related
    Operating System: FREE BSD 6.0
    PHP Version: 5.2.1
    New Comment:

    Thanks!!


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-23 20:40:48] [email]fmk@php.net[/email]

    This is a normal browser feature. The browser will reduce the
    whitespace (spaces, tabs new lines etc) to a single space. You could
    replace each space with &nbsp; if you want to force two spaces.

    ------------------------------------------------------------------------

    [2007-02-23 20:16:24] Joe at sofusion dot com

    When I use the <pre></pre> tags, It does display the correct data. Is
    this telling me that it is HTML that is concatinating the 2 spaces into
    one?
    Also you can use:
    $Name = str_replace (' ', ':', $RT['Name']);
    echo ' <p>Name2 = '.$Name . '</p>';
    to see the 2 spaces.

    When you duplicate the bug, do you have 2 spaces between the words in
    your browser?
    Thanks!!

    ------------------------------------------------------------------------

    [2007-02-23 19:29:07] [email]fmk@php.net[/email]

    I'm unable to reproduce this (on Linux and WIndows with FreeTDS). Try
    viewing the result outside the browser, use <pre></pre> or get the
    length of the column to verify that you are getting the right results.

    ------------------------------------------------------------------------

    [2007-02-23 16:18:14] Joe at sofusion dot com

    Sorry, dont use # in TBL Name. USE THIS DB CODE AND PHP CODE TO TEST:

    CREATE TABLE T1( Name varchar(255),
    Number int )
    INSERT INTO T1 VALUES('Two Spaces',1)
    INSERT INTO T1 VALUES('One Spaces',2)



    $sql = "SELECT Name FROM T1 WHERE Number = '1'";
    $rs = mssql_query($sql);
    while ($RT = mssql_fetch_array($rs))
    {$Name= $RT['Name'];
    //This should have 2 spaces in it like the DB
    //But it only has one
    echo ' <p>Name = '.$Name . '</p>';
    }

    ------------------------------------------------------------------------

    [2007-02-23 15:59:40] Joe at sofusion dot com

    Description:
    ------------
    When using mssql_fetch_arry and mssql_fetch_row, data returned that
    contains 2 spaces has been concatinated to one space. Example:
    Data returned should be "Two"' '' '"Spaces" (without quotes Two
    Spaces)
    But is returned as "Two"' '"Spaces" (without quotes -Two Spaces with
    one space between)

    FreeBSD WEBSERVER1.SOFUSION.local 6.0-RELEASE FreeBSD 6.0-RELEASE #0:
    Thu Nov 3 09:36:13 UTC 2005
    [email]root@x64.samsco.home[/email]:/usr/obj/usr/src/sys/GENERIC i386

    Build Date Feb 22 2007 19:36:38

    Configure Command './configure'
    '--with-apxs=/usr/local/apache/bin/apxs' '--enable-versioning'
    '--with-mssql=/usr/local' '--enable-libxml'

    Library version FreeTDS



    Reproduce code:
    ---------------
    --MSSQL TABLE

    CREATE TABLE #T1( Name varchar(255),
    Number int )
    INSERT INTO #T1 VALUES('Two Spaces',1)
    INSERT INTO #T1 VALUES('One Spaces',2)


    --PHP CODE

    $sql = "select Name FROM Name_TBL WHERE Number = '1'";
    $rs = mssql_query($sql);
    $RT = mssql_fetch_array($rs);
    $Name= $RT[Name'];
    --This should have 2 spaces in it like the DB
    --But it only has one
    echo $Name




    Expected result:
    ----------------
    Two Spaces
    --This has 2 spaces between the words.

    Actual result:
    --------------
    Two Spaces
    --This only hase 1 space between the words


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40607&edit=1[/url]
    Joe at sofusion dot com Guest

  8. #7

    Default #40607 [Csd->Bgs]: mssql_fetch_array concatinates spaces in middle of data

    ID: 40607
    Updated by: [email]tony2001@php.net[/email]
    Reported By: Joe at sofusion dot com
    -Status: Closed
    +Status: Bogus
    Bug Type: MSSQL related
    Operating System: FREE BSD 6.0
    PHP Version: 5.2.1


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-23 21:01:54] Joe at sofusion dot com

    Thanks!!

    ------------------------------------------------------------------------

    [2007-02-23 20:40:48] [email]fmk@php.net[/email]

    This is a normal browser feature. The browser will reduce the
    whitespace (spaces, tabs new lines etc) to a single space. You could
    replace each space with &nbsp; if you want to force two spaces.

    ------------------------------------------------------------------------

    [2007-02-23 20:16:24] Joe at sofusion dot com

    When I use the <pre></pre> tags, It does display the correct data. Is
    this telling me that it is HTML that is concatinating the 2 spaces into
    one?
    Also you can use:
    $Name = str_replace (' ', ':', $RT['Name']);
    echo ' <p>Name2 = '.$Name . '</p>';
    to see the 2 spaces.

    When you duplicate the bug, do you have 2 spaces between the words in
    your browser?
    Thanks!!

    ------------------------------------------------------------------------

    [2007-02-23 19:29:07] [email]fmk@php.net[/email]

    I'm unable to reproduce this (on Linux and WIndows with FreeTDS). Try
    viewing the result outside the browser, use <pre></pre> or get the
    length of the column to verify that you are getting the right results.

    ------------------------------------------------------------------------

    [2007-02-23 16:18:14] Joe at sofusion dot com

    Sorry, dont use # in TBL Name. USE THIS DB CODE AND PHP CODE TO TEST:

    CREATE TABLE T1( Name varchar(255),
    Number int )
    INSERT INTO T1 VALUES('Two Spaces',1)
    INSERT INTO T1 VALUES('One Spaces',2)



    $sql = "SELECT Name FROM T1 WHERE Number = '1'";
    $rs = mssql_query($sql);
    while ($RT = mssql_fetch_array($rs))
    {$Name= $RT['Name'];
    //This should have 2 spaces in it like the DB
    //But it only has one
    echo ' <p>Name = '.$Name . '</p>';
    }

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/40607[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=40607&edit=1[/url]
    tony2001@php.net Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139