src/Drivers/AbstractDriver.php
public function numRows(): ?int
	{
		$regex = '/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/i';
		$output = [];

		if (preg_match($regex, $this->lastQuery, $output) > 0)
		{
			$stmt = $this->query("SELECT COUNT(*) FROM {$output[1]}");
			return (int) $stmt->fetchColumn();
		}

		return NULL;
	}
public function numRows(): ?int
	{
		$regex = '/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/i';
		$output = [];

		if (preg_match($regex, $this->lastQuery, $output) > 0)
		{
			$stmt = $this->query("SELECT COUNT(*) FROM {$output[1]}");
			return (int) $stmt->fetchColumn();
		}

		return NULL;
	}
public function numRows ( ) : ? int { $ regex = '/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/i' ; $ output = [ ] ; if ( preg_match ( $ regex , $ this -> lastQuery , $ output ) > 0 ) { $ stmt = $ this -> query ( "SELECT COUNT(*) FROM {$output[1]}" ) ; return ( int ) $ stmt -> fetchColumn ( ) ; } return NULL ; }
Return the number of rows returned for a SELECT query

@see http://us3.php.net/manual/en/pdostatement.rowcount.php#87110
@return int|null
Return the number of rows returned for a SELECT query