CodeIgniter icon indicating copy to clipboard operation
CodeIgniter copied to clipboard

method num_rows() on oci8_result returns undefined var $rowcount

Open stefanomozart opened this issue 14 years ago • 3 comments

latest oci8_result.php has a bug on method num_rows().

$rowcount is never assigned in the context of the method, maybe somebody forgot to add the line: $rowcount = count($this->result_array()); that was present on the previous version

stefanomozart avatar Apr 19 '12 17:04 stefanomozart

Actually, I turned it into "return @oci_num_rows($this->stmt_id);", instead of "return $rowcount" on my local copy, and it works fine

stefanomozart avatar Apr 19 '12 17:04 stefanomozart

The latest version of CI_DB_oci8_result doesn't even contain 'rowcount':

$ grep -ri 'rowcount' system/database/drivers/oci8/*
$

I guess you're referring to CodeIgniter 2.1.0, but that issue has been fixed long ago. Checkout the code that's in the develop branch here on GitHub.

narfbg avatar Apr 19 '12 21:04 narfbg

I said latest meaning the latest version available to mortal newbies who simply download it from the official website and have a lot of trouble using a bugged driver... That is, C.I. 2.1.0 at http://codeigniter.com/download.php

stefanomozart avatar Apr 27 '12 22:04 stefanomozart