summaryrefslogtreecommitdiffstats
path: root/codebase/connector/db_phpci.php
diff options
context:
space:
mode:
Diffstat (limited to 'codebase/connector/db_phpci.php')
-rw-r--r--codebase/connector/db_phpci.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/codebase/connector/db_phpci.php b/codebase/connector/db_phpci.php
index e38d831..15ed95f 100644
--- a/codebase/connector/db_phpci.php
+++ b/codebase/connector/db_phpci.php
@@ -44,16 +44,24 @@ class PHPCIDBDataWrapper extends DBDataWrapper{
}
class PHPCIResultSet{
+ private $is_result_done = false;
private $res;
private $start;
private $count;
public function __construct($res){
+ if(is_bool($res)) {
+ $this->$is_result_done = true;
+ return $this;
+ }
$this->res = $res;
$this->start = $res->current_row;
- $this->count = $res->num_rows;
+ $this->count = $res->num_rows();
}
public function next(){
+ if($this->is_result_done)
+ return null;
+
if ($this->start != $this->count){
return $this->res->row($this->start++,'array');
} else {