Added affectedRows method