Various fixes and cleanup :
* Always return at least success information * Fix issues with Wishes * Fix issues with Circulations * Fix typos in exceptions
This commit is contained in:
@@ -64,6 +64,7 @@ class OdbcResultSet implements \Iterator, \ArrayAccess
|
||||
private $results;
|
||||
private $error;
|
||||
private $num_fields;
|
||||
private $num_rows;
|
||||
private $cursor_index;
|
||||
|
||||
public function __construct($odbc_result)
|
||||
@@ -74,6 +75,7 @@ class OdbcResultSet implements \Iterator, \ArrayAccess
|
||||
try {
|
||||
$this->results = array();
|
||||
$this->num_fields = odbc_num_fields($odbc_result);
|
||||
$this->num_rows = odbc_num_rows($odbc_result);
|
||||
|
||||
if ($this->num_fields > 0) {
|
||||
while ($row = odbc_fetch_row($odbc_result)) {
|
||||
@@ -94,6 +96,11 @@ class OdbcResultSet implements \Iterator, \ArrayAccess
|
||||
}
|
||||
}
|
||||
|
||||
public function get_num_rows()
|
||||
{
|
||||
return $this->num_rows;
|
||||
}
|
||||
|
||||
public function is_error()
|
||||
{
|
||||
return ($this->error ? true : false);
|
||||
|
||||
Reference in New Issue
Block a user