nerdexam
CIW

1D0-437 · Question #84

Which line of code represents the correct syntax to establish a reference to a database handle?

The correct answer is D. $dbh = DBI->connect("dbi:mysql:myPhoneBook"). See the full explanation below for the reasoning.

Question

Which line of code represents the correct syntax to establish a reference to a database handle?

Options

  • A$dbh = DBI::connect("dbi:mysql:myPhoneBook");
  • B$dbh = DBD:->connect("dbi::mysql::myPhoneBook");
  • C$dbh = DBD::connect("mysql:dbi:myPhoneBook");
  • D$dbh = DBI->connect("dbi:mysql:myPhoneBook");

How the community answered

(33 responses)
  • A
    15% (5)
  • B
    3% (1)
  • C
    6% (2)
  • D
    76% (25)

Community Discussion

No community discussion yet for this question.

Full 1D0-437 Practice