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

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

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

  1. echo "<h1>This is PHP version " . phpversion() . "</h1>"; // returns 7.1.10
  2. error_reporting(E_ALL);
  3. ini_set('display_errors', 'on');
  4. echo "<h3>Script Runtime: ". ini_get('max_execution_time') ." Sec.</h3>"; // returns 300
  5. echo "<h3>Memory Limit: ". ini_get('memory_limit') ."</h3>"; // retuns 100M
  6. $i = 0;
  7. $sql = "SELECT * FROM tblClients ORDER BY lastname, firstname";
  8. if (! $recClients = mysqli_query($GLOBALS['conn'], $sql)) {die("<p><b>SQL:</b><br>".$sql."</p>");}
  9. echo "<table>";
  10. echo "<tr>";
  11. echo "<th>Nr.</th>";
  12. echo "<th>Firstname</th>";
  13. echo "<th>Lastname</th>";
  14. echo "</tr>";
  15. while ($rowClients = mysqli_fetch_assoc($recClients)) {
  16. echo "<tr>";
  17. echo "<td>" . $i++ . "</td>";
  18. echo "<td>" . $rowClients['firstname'] . "</td>";
  19. echo "<td>" . $rowClients['lastname'] . "</td>";
  20. echo "</tr>";
  21. }
  22. echo "</table>";

暂无答案!

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

相关问题