php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2874 Cast needed for sybase_fetch_array
Submitted: 1999-11-30 16:32 UTC Modified: 2000-05-22 03:45 UTC
From: peter at mediasvar dot se Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.0 Beta 3 OS: Solaris 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: peter at mediasvar dot se
New email:
PHP Version: OS:

 

 [1999-11-30 16:32 UTC] peter at mediasvar dot se
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 --
*/
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-03-09 20:52 UTC] joey at cvs dot php dot net
Could you provide me with a sample of the data
and metadata needed to test your example script?
I cannot seem to reproduce this one.
 [2000-05-22 03:45 UTC] joey at cvs dot php dot net
No feedback.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC