PHP 4.0 Bug #2874: Cast needed for sybase_fetch_array

From: Date: Tue, 30 Nov 1999 15:32:17 +0000
Subject: PHP 4.0 Bug #2874: Cast needed for sybase_fetch_array
Groups: php.dev 
Request: Send a blank email to php-dev+get-13299@lists.php.net to get a copy of this message
From: peter@mediasvar.se 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 -- */ ?>

« previous php.dev (#13299) next »