Misc. Firebird class fixes
This commit is contained in:
parent
f335fa744d
commit
9827a86a20
@ -20,7 +20,6 @@
|
|||||||
class firebird extends DB_PDO {
|
class firebird extends DB_PDO {
|
||||||
|
|
||||||
protected $conn, $statement, $trans, $count, $result;
|
protected $conn, $statement, $trans, $count, $result;
|
||||||
private $esc_char = "''";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the link to the database
|
* Open the link to the database
|
||||||
@ -195,21 +194,15 @@ SQL;
|
|||||||
public function num_rows()
|
public function num_rows()
|
||||||
{
|
{
|
||||||
// @todo: Redo this similar to the codeigniter driver
|
// @todo: Redo this similar to the codeigniter driver
|
||||||
$count = 0;
|
if(isset($this->result))
|
||||||
|
|
||||||
if(isset($this->statement))
|
|
||||||
{
|
{
|
||||||
while($row = $this->fetch())
|
return count($this->result);
|
||||||
{
|
|
||||||
$count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
public function execute($args)
|
||||||
{
|
{
|
||||||
// Is there a better way to do this?
|
// 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
|
// End of firebird.php
|
@ -87,6 +87,5 @@ class firebird_manip extends db_manip {
|
|||||||
{
|
{
|
||||||
return 'DROP TABLE "'.$name.'"';
|
return 'DROP TABLE "'.$name.'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//End of firebird_manip.php
|
//End of firebird_manip.php
|
Reference in New Issue
Block a user