Misc. Firebird class fixes

This commit is contained in:
Timothy Warren 2012-02-22 11:38:09 -05:00
parent f335fa744d
commit 9827a86a20
2 changed files with 8 additions and 16 deletions

View File

@ -20,7 +20,6 @@
class firebird extends DB_PDO {
protected $conn, $statement, $trans, $count, $result;
private $esc_char = "''";
/**
* Open the link to the database
@ -195,21 +194,15 @@ SQL;
public function num_rows()
{
// @todo: Redo this similar to the codeigniter driver
$count = 0;
if(isset($this->statement))
if(isset($this->result))
{
while($row = $this->fetch())
{
$count++;
}
}
else
{
return FALSE;
return count($this->result);
}
return $count;
//Fetch all the rows for the result
$this->result = $this->fetchAll();
return count($this->result);
}
/**
@ -256,7 +249,7 @@ SQL;
public function execute($args)
{
// Is there a better way to do this?
return eval("ibase_execute({$this->statement},".explode(',', $args).")");
}
return eval('ibase_execute('.$this->statement.','.explode(',', $args).")");
}
}
// End of firebird.php

View File

@ -87,6 +87,5 @@ class firebird_manip extends db_manip {
{
return 'DROP TABLE "'.$name.'"';
}
}
//End of firebird_manip.php