Add fetchObject method to Firebird_result class
This commit is contained in:
parent
3c74f243fe
commit
5a4f6a3455
@ -30,6 +30,7 @@ class Firebird_Result extends PDOStatement {
|
|||||||
public function __construct($link)
|
public function __construct($link)
|
||||||
{
|
{
|
||||||
$this->statement = $link;
|
$this->statement = $link;
|
||||||
|
$this->setFetchMode(PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@ -166,6 +167,19 @@ class Firebird_Result extends PDOStatement {
|
|||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emulate PDOStatement::fetchObject, but only for the default use
|
||||||
|
*
|
||||||
|
* @param int $colum_num
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function fetchObject($class_name='stdClass', $ctor_args=array())
|
||||||
|
{
|
||||||
|
return $this->fetch(PDO::FETCH_OBJ);
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the number of rows affected by the previous query
|
* Return the number of rows affected by the previous query
|
||||||
*
|
*
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user