nerdexam
CIW

1D0-437 · Question #76

1D0-437 Question #76: Real Exam Question with Answer & Explanation

The correct answer is B. $sth = $dbh->prepare(SELECT * FROM aTable);. See the full explanation below for the reasoning.

Question

Which of the following code segments correctly readies a database query, creating a valid statement handle and a result set? Assume $dbh represents a valid database handle.

Options

  • A$sth = $dbh->prep_statement(SELECT * FROM aTable); $sth->execute_statement;
  • B$sth = $dbh->prepare(SELECT * FROM aTable);
  • C$sth = $dbh->prep_statement(SELECT * FROM aTable); $sth->execute;
  • D$sth = $dbh->prepare_statement(SELECT * FROM aTable); $sth->execute_statement;

Community Discussion

No community discussion yet for this question.

Full 1D0-437 Practice