$data = $dbh->prepare('SELECT workloadformula,coursecode FROM coursedetails WHERE coursecode = ' . $dbh->quote($coursecode) . ' ; select concat(firstname," ",lastname) as name from lecturerdetails where concat(firstname," ",lastname) = ' . $dbh->quote($name) . '');
$data->execute();
do {
$result = $data->fetchAll();
$final = var_dump($result);
echo "$final";
} while
(
$dbh->nextRowset()
);
$data = $dbh->prepare(‘SELECT workloadformula,coursecode FROM coursedetails WHERE coursecode = ‘ . $dbh->quote($coursecode) . ‘
Share
Assuming
$dbhis an instance of thePDOclass:PDO::nextRowset(), you probably meant$data->nextRowset().var_dump()doesn’t return anything, so assigning the result to$finalis meaningless.