public function numRows($result) { if (is_bool($result)) { return 0; } return count($GLOBALS['dummy_queries'][$result]['result']); }