php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1611 odbc_num_rows() can't get rows num
Submitted: 1999-06-28 05:21 UTC Modified: 1999-07-11 04:09 UTC
From: wjw at hongzhi dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 3.0.11 OS: winNT
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: wjw at hongzhi dot com
New email:
PHP Version: OS:

 

 [1999-06-28 05:21 UTC] wjw at hongzhi dot com
i use odbc_num_rows() can't get rows num only get -1
follow the code i use odbc get dbase & SQL dbase can't get num rows

//open dbase
$db = odbc_connect("db", "wjw", "wjw");
$result = odbc_exec($db, "SELECT * FROM n64 where etitle like '%'");
echo  odbc_num_fields($result)."<br>";

echo odbc_num_rows($result)."<br>";


for ($i=1; $i<=150; $i++) {
	if (odbc_fetch_row($result, $i))
		echo odbc_result($result, 3)."<br>";
}
//echo odbc_result_all($result, "");
odbc_close($db);


//open ms sql server
$db = odbc_connect("ss", "sa", "");
$result = odbc_exec($db, "SELECT * FROM authors");
echo  odbc_num_fields($result)."<br>";

echo odbc_num_rows($result)."<br>";


for ($i=1; $i<=150; $i++) {
	if (odbc_fetch_row($result, $i))
		echo odbc_result($result, 4)."<br>";
}
//echo odbc_result_all($result, "");
odbc_close($db);

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-11 04:09 UTC] kara at cvs dot php dot net
Many drivers don't support this for select statements
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 06:01:38 2025 UTC