I have a query in mysql which will return a table grouped by some fields. How can I echo these results? Here is piece of my code.
$stmt = $con->prepare("
SELECT classSubject
, COUNT(*) cnt
from Class
where grade=?
and department=?
and classGroup IN(?,3)
GROUP
BY classSubject;
");
$stmt->bind_param("isi", $grade, $department, $classGroup);
//executing the query
$stmt->execute();
What should I do after this so that I can echo all the result?