Assume $sth is a valid statement handle. Which of the following correctly outputs the data from
the first three columns of a result set?
A.
while(@rcrds = $sth->fetch_array)
{
print($rcrds[0]\n);
print($rcrds[1]\n);
print($rcrds[2]\n); }
B.
while(@rcrds = $sth->fetch_array)
{
print($rcrds[1]\n);
print($rcrds[2]\n);
print($rcrds[3]\n);
}
C.
while(@rcrds = $sth->fetchrow_array)
{
print($rcrds[1]\n);
print($rcrds[2]\n);
print($rcrds[3]\n);
}
D.
while(@rcrds = $sth->fetchrow_array)
{
print($rcrds[0]\n);
print($rcrds[1]\n);
print($rcrds[2]\n);
}