[eluser]Unknown[/eluser]
I'm trying to show results of a query, the db2 connection to work properly,
but send me the following error when I run the query:
Fatal error: Call to a member function rowCount () on a non-object in
database / drivers / pdo / pdo_result.php on line 42.
I think that this error had been fixed in version 2.1.1 but the upgrade to version 2.2.0 returned.
Code:
public function num_rows()
{
if (is_int($this->num_rows))
{
return $this->num_rows;
}
elseif (($this->num_rows = $this->result_id->rowCount()) > 0) //line 42
{
return $this->num_rows;
}
$this->num_rows = count($this->result_id->fetchAll());
$this->result_id->execute();
return $this->num_rows;
}