There is a database exams having a table exam.
I want to run a query stored in $sql_query
.
Output it is showing in localhost SQL server is :
But while using it in php it is showing me only single row.
$sql_query = "SELECT * FROM exam_timing AS et INNER JOIN exam_details AS ed
ON et.exam_id = ed.Id WHERE et.Admin_Id = '$username'";
$ids = mysqli_fetch_array(mysqli_query($db_exams, $sql_query), MYSQLI_NUM);
foreach($ids as $id) {
echo $id," ";
}
Output of this is :
27 113 15:59:00 2020-12-25 30 2 pb 113 php BCA 2 1
It should show two rows.