Home » PHP » PHP MySQL Database » Question
  1. Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query?
    1. changed_rows()
    2. new_rows()
    3. num_rows()
    4. affected_rows()
    5. None of these
Correct Option: D

The method num_rows() is only useful for determining the number of rows retrieved by a SELECT query. But to retrieve the number of rows affected by INSERT, UPDATE, or DELETE query, use affected_rows().



Your comments will be displayed only after manual approval.