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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC