при выполнении ниже код PHP ошибка appreas сPHP ошибка MySQLi оператор
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the erro occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
код PHP:
<?php
require "init.php";
$Date = [];
$Subject = [];
$Desc= [];
$query = mysqli_query($con,"SELECT date, Subject, Desc FROM sherif_DCOAn");
while($row = mysqli_fetch_assoc($query)){
$Date[] = $row['date'];
$Subject[] = $row['Subject'];
$Desc[] = $row['Desc'];
echo json_encode($Date).','.json_encode($Subject).','.json_encode($Desc).',';
}
?>
ошибка появляется, когда я добавляю в то время как часть:
while($row = mysqli_fetch_assoc($query)){Whatever code}
Я применил то же самое к другому выбору, и он работает:
$query = mysqli_query($con,"SELECT DISTINCT SiteName FROM CAB");
Что случилось с первым?
ты спас меня :) .. это был ответ –
@SheriffSaidElahl Я был там больше раз, чем мог! Выработал ответ немного, спасибо за лучший ответ. –
Это имена столбцов, а не таблица. – jkavalik