php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4502 sybase_fetch_row stops before getting all rows
Submitted: 2000-05-18 15:23 UTC Modified: 2000-09-03 19:35 UTC
From: salim at sdv dot fr Assigned:
Status: Closed Package: Sybase (dblib) related
PHP Version: 4.0 Release Candidate 2 OS: Linux RH 6.2
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: salim at sdv dot fr
New email:
PHP Version: OS:

 

 [2000-05-18 15:23 UTC] salim at sdv dot fr
compile line : --with-apxs=/usr/local/apache/bin/apxs --with-sybase=/opt/sybase-11.9.2

Description:

I do a select using sysbase_query which is supposed
to return 2107 rows .
When I loop on sybase_fetch_row, I stops before 400 rows.
In fact the number is totally random, I got between
6 rows and 300 ..

Nota:
The remote server is a SqlServer 7.0
I used sybase server libraries but the problem occurs
if I use freetds sybase libs.
Most important, everything is fine when using php3.
with both sybase libs.

The script:

<html>
<body>

<?
function Error( $msg, $db )
{
	echo "$msg \n";
	sybase_close( $db);
	exit();
}
 
	$db=sybase_connect('sqlserver','user','pass');
 	if(!$db) Error("Error in sybase_connect",$db);

	$cur=sybase_query("select * from test",$db);
	if(!$cur) Error( "Error in sybase_query",$db);
 
	echo "<table border=1><tr><th>value</th></tr>\n";
	$nbrow=0;
 
	while($row=sybase_fetch_row($cur))
	{
	echo "<tr><td align=center>$row[0]</td></tr>\n";
	$nbrow++;
	}
 
	echo "<tr><td>$nbrow entries</td></tr></table>";
	sybase_close($db);
?>
</body>
</html>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-20 03:35 UTC] sniper@php.net
Does this problem still persist with more recent version of php (from CVS or http://snaps.php.net) ??

--Jani
 [2000-09-03 19:35 UTC] sniper@php.net
No feedback from user. Closed.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC