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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
50 - 49 = ?
Subscribe to this entry?

 
 [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: Sun Jun 16 03:01:28 2024 UTC