public function numRows() { if (!isset($this->result)) { throw new Exception('Error: The database result resource is not currently set.'); } return $this->result->rowCount(); }