[PHP-DEV] PHP 4.0 Bug #2874: Cast needed for sybase_fetch_array From: peter <email protected>
Date: 11/30/99

From: peter <email protected>
Operating system: Solaris 2.6
PHP version: 4.0 Beta 3
PHP Bug Type: Sybase-ct (ctlib) related
Bug description: Cast needed for sybase_fetch_array

This is a sample for PHP4 b3. How come these errors occours?
$j and $k should be equal but they are not. only $j works. should it really be this way?
in the php3-way you didn't need to cast.

-- CUT --
<?
$sql = "select * from linkdb_intresse where id<10";
$res = sybase_query($sql,$conn);
        
$i=0;
while ($rs = sybase_fetch_array($res))
{
        if ($i++ == 0) {
                $j = (string) $rs[1];
                $k = $rs[1];
        }
        echo $j.", ".$k."<BR>";
        // $j and $k should be equal but they are not. only $j works. should it really be this way?
        // in the php3-way you didn't need to cast.
}

/*
Sample output:
-- CUT --
Test1, Test1
Test1,
Test1,
Test1,
Test1, Test2
Test1,
Test1,
Test1,
Test1, Test3
-- CUT --
*/
?>

-- 
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>