Zend
200-710 · Question #53
200-710 Question #53: Real Exam Question with Answer & Explanation
Sign in or unlock 200-710 to reveal the answer and full explanation for question #53. The question stem and answer options stay visible for context.
Question
Consider the following table data and PHP code. 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] 4 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); $cmd = 'SELECT * FROM users WHERE id = :id'; $stmt = $pdo->prepare($cmd); $id = 3; $stmt->bindParam('id', $id); $stmt->execute(); $stmt->bindColumn(3, $result); $srow = $stmt->fetch(PDO::FETCH_BOUND);
1 anna [email protected] 2 betty [email protected] 3 clara [email protected] 4 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); $cmd = 'SELECT * FROM users WHERE id = :id'; $stmt = $pdo->prepare($cmd); $id = 3; $stmt->bindParam('id', $id); $stmt->execute(); $stmt->bindColumn(3, $result); $srow = $stmt->fetch(PDO::FETCH_BOUND);
Options
- AThe database will return no rows.
- BThe value of $srow will be an array.
- CThe value of $result will be empty.
- DThe value of $result will be '[email protected]'.
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.