Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam 200-710 All Questions

View all questions & answers for the 200-710 exam

Exam 200-710 topic 1 question 42 discussion

Actual exam question from Zend's 200-710
Question #: 42
Topic #: 1
[All 200-710 Questions]

Consider the following table data and PHP code. What is the outcome?
Table data (table name "users" with primary key "id"):

PHP code (assume the PDO connection is correctly established):

  • A. The INSERT will succeed and the user will see the "Success!" message.
  • B. The INSERT will fail because of a primary key violation, and the user will see the "Success!" message.
  • C. The INSERT will fail because of a primary key violation, and the user will see a PDO warning message.
  • D. The INSERT will fail because of a primary key violation, and the user will see the "Failure!" message.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
gaddour_med
2 years, 7 months ago
B is correct execute() return true on success and false on error. no need of try catch.
upvoted 1 times
...
sjranjan
3 years, 1 month ago
The correct answer is D
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...