php脚本停止//在表中循环

ht4b089n  于 2021-06-23  发布在  Mysql
关注(0)|答案(0)|浏览(235)

我有一个非常简单的脚本在mysql表(3500条记录)中循环,并在html表中返回结果。
脚本突然结束(500之后),没有出现错误,也没有到达表的末尾。
有什么问题吗?非常感谢您的评论。
干杯
提姆

echo "<h1>This is PHP version " . phpversion() . "</h1>"; // returns 7.1.10
error_reporting(E_ALL);
ini_set('display_errors', 'on');

echo "<h3>Script Runtime: ". ini_get('max_execution_time') ." Sec.</h3>"; // returns 300
echo "<h3>Memory Limit: ". ini_get('memory_limit') ."</h3>"; // retuns 100M

$i = 0;
$sql = "SELECT * FROM tblClients ORDER BY lastname, firstname";
if (! $recClients = mysqli_query($GLOBALS['conn'], $sql)) {die("<p><b>SQL:</b><br>".$sql."</p>");}

    echo "<table>";
    echo "<tr>";
    echo   "<th>Nr.</th>";
    echo   "<th>Firstname</th>";
    echo   "<th>Lastname</th>";
    echo "</tr>";

    while ($rowClients = mysqli_fetch_assoc($recClients)) {

        echo "<tr>";
        echo   "<td>" . $i++ . "</td>";
        echo   "<td>" . $rowClients['firstname'] . "</td>";
        echo   "<td>" . $rowClients['lastname']  . "</td>";
        echo "</tr>";
    }
    echo "</table>";

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题