summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/interbase/interbase_result.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-02-20 23:54:39 +0100
committerTimothy Warren <tim@timshomepage.net>2012-02-20 23:54:39 +0100
commit2da66edce7c249c0305153a65c4292311f49a546 (patch)
tree44419cd80632889375dac2602972578038c0808b /system/database/drivers/interbase/interbase_result.php
parent95562144da88784588fb2477fa0070576bd386a0 (diff)
Fix counting issue, minor formatting
Diffstat (limited to 'system/database/drivers/interbase/interbase_result.php')
-rw-r--r--system/database/drivers/interbase/interbase_result.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/system/database/drivers/interbase/interbase_result.php b/system/database/drivers/interbase/interbase_result.php
index 7a3a41f2c..9caf1ce91 100644
--- a/system/database/drivers/interbase/interbase_result.php
+++ b/system/database/drivers/interbase/interbase_result.php
@@ -82,7 +82,7 @@ class CI_DB_interbase_result extends CI_DB_result {
public function list_fields()
{
$field_names = array();
- for ($i = 0, $num_fields=$this->num_fields(); $i < $num_fields; $i++)
+ for ($i = 0, $num_fields = $this->num_fields(); $i < $num_fields; $i++)
{
$info = ibase_field_info($this->result_id, $i);
$field_names[] = $info['name'];
@@ -104,7 +104,7 @@ class CI_DB_interbase_result extends CI_DB_result {
{
$retval = array();
- for ($i = 0, $num_fields=$this->num_fields(); $i < $num_fields; $i++)
+ for ($i = 0, $num_fields = $this->num_fields(); $i < $num_fields; $i++)
{
$info = ibase_field_info($this->result_id, $i);
@@ -164,10 +164,13 @@ class CI_DB_interbase_result extends CI_DB_result {
*/
protected function _fetch_assoc()
{
- //Increment row count
- $this->num_rows++;
+ if(($row = @ibase_fetch_assoc($this->result_id, IBASE_FETCH_BLOBS)) !== FALSE)
+ {
+ //Increment row count
+ $this->num_rows++;
+ }
- return @ibase_fetch_assoc($this->result_id, IBASE_FETCH_BLOBS);
+ return $row;
}
// --------------------------------------------------------------------
@@ -181,10 +184,13 @@ class CI_DB_interbase_result extends CI_DB_result {
*/
protected function _fetch_object()
{
- //Increment row count
- $this->num_rows++;
+ if(($row = @ibase_fetch_object($this->result_id, IBASE_FETCH_BLOBS)) !== FALSE)
+ {
+ //Increment row count
+ $this->num_rows++;
+ }
- return @ibase_fetch_object($this->result_id, IBASE_FETCH_BLOBS);
+ return $row;
}
// --------------------------------------------------------------------