CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 53: 200-550: Zend Certified PHP Engineer

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]5 sue [email protected]PHP code (assume the PDO connection is correctly…

Nội dung câu hỏi

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]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);$cmd = "SELECT * FROM users WHERE id = :id";$stmt = $pdo->prepare($cmd);$id = 3;$stmt->bindParam('id', $id);$stmt->execute();$stmt->bindColumn(3, $result);$row = $stmt->fetch(PDO::FETCH_BOUND);

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. The database will return no rows.
  2. B. The value of $row will be an array.
  3. C. The value of $result will be empty.
  4. D. The value of $result will be '[email protected]'. — đáp án hiện tại

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề