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:
Gilles Crettenand
2015-06-03 10:02:28 +02:00
parent b81dacd194
commit da0efd72be
5 changed files with 42 additions and 20 deletions

View File

@@ -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);