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.
A.
$sth = $dbh->prep_statement(SELECT * FROM aTable);
$sth->execute_statement;
B.
$sth = $dbh->prepare(SELECT * FROM aTable);
$sth->execute;
C.
$sth = $dbh->prep_statement(SELECT * FROM aTable);
$sth->execute;
D.
$sth = $dbh->prepare_statement(SELECT * FROM aTable);
$sth->execute_statement;
Explanation:
[Note] Only have method “$ dbh -> prepare( …)”,
$ dbh -> prep_ statement ( …) is not existed