I have this query prepared in a php file.
$consulta = $conn->prepare("SELECT examen.idexamen,examen.detalles, count(*)
from examen,preguntas
having count(*) IN
(SELECT count(*) FROM preguntas
group by preguntas.examen)");
And I also want to print the count (*) and I've tried this:
while($f1 = $consulta->fetch()){
echo $f1[3];
}
and it does not work.
Any solution?