Replaced all mysql_affected_rows calls to the corresponding wrapper calls