public function countAffected($cursor = null)
    {
        if (!$cursor instanceof \PDOStatement) {
            $cursor = $this->getCursor();
        }

        if (!$cursor) {
            return 0;
        }

        return $cursor->rowCount();
    }
public function countAffected($cursor = null)
    {
        if (!$cursor instanceof \PDOStatement) {
            $cursor = $this->getCursor();
        }

        if (!$cursor) {
            return 0;
        }

        return $cursor->rowCount();
    }
public function countAffected ( $ cursor = null ) { if ( ! $ cursor instanceof \ PDOStatement ) { $ cursor = $ this -> getCursor ( ) ; } if ( ! $ cursor ) { return 0 ; } return $ cursor -> rowCount ( ) ; }
Get the number of affected rows for the previous executed SQL statement.
Only applicable for DELETE, INSERT, or UPDATE statements.

@param  \PDOStatement $cursor

@return int The number of affected rows.

@since   2.0
Get the number of affected rows for the previous executed SQL statement . Only applicable for DELETE INSERT or UPDATE statements .