nerdexam
Zend

200-710 · Question #56

200-710 Question #56: Real Exam Question with Answer & Explanation

Sign in or unlock 200-710 to reveal the answer and full explanation for question #56. The question stem and answer options stay visible for context.

Question

QUESTION 59 Consider the following table data and PHP code, and assume that the database supports transactions. What is the outcome? Table data (table name "users" with primary key "id"): id name email
1 anna [email protected] 2 betty [email protected] 3 clara [email protected] 5 sue [email protected] PHP code (assume the PDO connection is correctly established): $dsn = 'mysql:host=localhost;dbname=exam'; $user = 'username'; $pass = '********'; $pdo = new PDO($dsn, $user, $pass); try { $pdo->exec("INSERT INTO users (id, name, email) VALUES (6, 'bill', '[email protected]')"); $pdo->exec("INSERT INTO users (id, name, email) VALUES (7, 'john', '[email protected]')"); throw new Exception(); } catch (Exception $e) { $pdo->rollBack(); }

Options

  • AThe user 'bill' will be inserted, but the user 'john' will not be.
  • BBoth user 'bill' and user 'john' will be inserted.
  • CNeither user 'bill' nor user 'john' will be inserted.
  • DThe user 'bill' will not be inserted, but the user 'john' will be.

Unlock 200-710 to see the answer

You've previewed enough free 200-710 questions. Unlock 200-710 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 200-710 Practice