Single Choice Not Set

Q Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query?

ID: #2556 MySql with PHP Basic MCQ 4,532 views
Question Info
#2556Q ID
Not SetDifficulty
MySql with PHP Basic MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A num_rows()
  • B affected_rows()
  • C changed_rows()
  • D new_rows()
Correct Answer

Explanation

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().

Share This Question

Challenge a friend or share with your study group.