Add Affected_rows function