这句话说 <?php while ($row = $arne->fetch()) { ?> 似乎在localhost服务器上完全正常工作:Picture: localhost setup

<?php
    $arne = $db->query("SELECT *, AVG(correct_answers) AS average FROM result r, quiz q WHERE r.quiz_id=q.id GROUP BY quiz_id ORDER BY average");
    ?>
    <h1>Average Score</h1>
    <div id="table-wrapper">
        <div id="table-scroll">
            <table>
                <tr>
                    <th>Quiz</th>
                    <th>Result</th>
                    <th>Questions</th>
                </tr>
                <?php while ($row = $arne->fetch()) { ?>
                <tr>
                <td><a href="/quiz/<?=$row["quiz_id"]?>"><?=$row["name"]?></a></td>
                <td><?=floor($row["average"]*100 / $row["question_count"])?></td>
                <td><?=$row["question_count"]?></td>
                </tr>
                <?php } ?>
            </table>
        </div>
    </div>

但在网络服务器上使用时:Picture: webserver setup

我收到错误:

致命错误:未捕获错误:在/var/www/html/php/pages/statistics.php:15中调用boolean上的成员函数fetch()堆栈跟踪:#0 /var/www/html/php/index.php (82):在第15行的/var/www/html/php/pages/statistics.php中引入include()#1

第15行不是第15行,但该行包含:

<?php while ($row = $arne->fetch()) { ?>

感谢帮助!