summaryrefslogtreecommitdiffstats
path: root/codebase/db_phpci.php
diff options
context:
space:
mode:
authorEgor <egor.26.93@gmail.com>2015-06-01 16:13:22 +0300
committerEgor <egor.26.93@gmail.com>2015-06-01 16:13:22 +0300
commit78aad87a38d6372961f3ccfb11a7ad6f05931665 (patch)
tree86a18989d183df66c01fcd0f8bde90ac893b6cb4 /codebase/db_phpci.php
parent458f0aead573842f1df00ce2ae00334c27f66585 (diff)
downloadconnector-php-78aad87a38d6372961f3ccfb11a7ad6f05931665.zip
connector-php-78aad87a38d6372961f3ccfb11a7ad6f05931665.tar.gz
connector-php-78aad87a38d6372961f3ccfb11a7ad6f05931665.tar.bz2
Added db wrapper for codeigniter version 3.
Diffstat (limited to 'codebase/db_phpci.php')
-rw-r--r--codebase/db_phpci.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/codebase/db_phpci.php b/codebase/db_phpci.php
index 9d10d99..17fe8a0 100644
--- a/codebase/db_phpci.php
+++ b/codebase/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 {