mysqli_num_rows()This function is only used for the SELECT query method
而mysqli_affected_rows()The function records the impact of the previous SQL statement on the entire database and returns the number of affected data. This function is mainly used for INSERT, UPDATE, and DELETE.