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)- A15% (5)
- B3% (1)
- C6% (2)
- D76% (25)
Community Discussion
No community discussion yet for this question.