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

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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, 2 months ago
B is correct execute() return true on success and false on error. no need of try catch.
upvoted 1 times
...
sjranjan
2 years, 9 months 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 ...
ex Want to SAVE BIG on Certification Exam Prep?
close
ex Unlock All Exams with ExamTopics Pro 75% Off
  • arrow Choose From 1000+ Exams
  • arrow Access to 10 Exams per Month
  • arrow PDF Format Available
  • arrow Inline Discussions
  • arrow No Captcha/Robot Checks
Limited Time Offer
Ends in