summaryrefslogtreecommitdiffstats
path: root/codebase/connector/db_phpci.php
diff options
context:
space:
mode:
authorAlexKlimenkov <shurick.klimenkov@gmail.com>2017-01-31 18:38:36 +0300
committerAlexKlimenkov <shurick.klimenkov@gmail.com>2017-01-31 18:38:36 +0300
commitae92cf850550a9be965db867ba4bfb5651a18e5f (patch)
treebbf70ce45cc6e608def6e9a81570febe4528208b /codebase/connector/db_phpci.php
parent2e509c1f562c4f471d766c9b3532370f847f0839 (diff)
downloadscheduler-ae92cf850550a9be965db867ba4bfb5651a18e5f.zip
scheduler-ae92cf850550a9be965db867ba4bfb5651a18e5f.tar.gz
scheduler-ae92cf850550a9be965db867ba4bfb5651a18e5f.tar.bz2
[update] version 4.4.0
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 {