Welcome Guest, Not a member yet? Register   Sign In
Connect to db2 from pdo no results v.2.2.0
#1

[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;
}


Messages In This Thread
Connect to db2 from pdo no results v.2.2.0 - by El Forum - 06-10-2014, 10:27 AM
Connect to db2 from pdo no results v.2.2.0 - by El Forum - 06-10-2014, 03:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB