function getRowCount() { if($this->is_cached_rs) return $this->cached_rs->getRowCount(); else return parent :: getRowCount(); }