我的php代码是说我在数据库中没有任何东西,尽管我有。我的代码怎么了? 虎根 font1先生{ 字体系列:“Raleway”,无衬线; } 虎根

我的php代码是说我在数据库中没有任何东西,尽管我有。我的代码怎么了? 虎根 font1先生{ 字体系列:“Raleway”,无衬线; } 虎根 ,php,sql,database,Php,Sql,Database,科目表: 嘿,这里显示的不是数据,而是列定义 但您在这里查询的是accs表中的数据 $sql=“从账户中选择账户” 我相信accs表中没有数据,但您假设列定义是数据 在使用phpMyAdmin时,请使用“浏览”按钮检查表中是否有任何数据尝试回显$result并查看输出。connection.php中的代码是什么?数据库中是否存在accs表?同时检查是否存在echo mysqli_错误($conn)查看可能的错误(查询后)@MahirRawal没有显示任何内容。@DrJManish accs确实

科目表:
嘿,这里显示的不是数据,而是列定义

但您在这里查询的是accs表中的数据

$sql=“从账户中选择账户”

我相信accs表中没有数据,但您假设列定义是数据


在使用phpMyAdmin时,请使用“浏览”按钮检查表中是否有任何数据

尝试回显$result并查看输出。connection.php中的代码是什么?数据库中是否存在accs表?同时检查是否存在echo mysqli_错误($conn)查看可能的错误(查询后)@MahirRawal没有显示任何内容。@DrJManish accs确实存在
    <!DOCTYPE html>
    <html>
    <head>
        <title>Tiger-Gen</title>

        <!-- Compiled and minified CSS -->
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/css/materialize.min.css">

        <!-- Compiled and minified JavaScript -->
        <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/js/materialize.min.js"></script>
                <link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
    <link rel="stylesheet" href="main.css">
    </head>

    <body>
        <style>
        .font1 {
            font-family: 'Raleway', sans-serif;
        }
    </style>
        <div class=" container center-align font1 y">
        <h1 class="yeet big">Tiger-Gen</h1>
    <?php 
    include ("connection.php");
        $sql= "SELECT account FROM accs";
        $result = mysqli_query($conn, $sql);

        if (mysqli_num_rows($result) > 0) {
            //output account
            while($row = mysqli_fetch_assoc($result)) {
                echo $row["account"];
            }
        } else {
            echo "nothing";
        }

        mysqli_close($conn);
        ?> 

        <a class="waves-effect waves-light btn center-align btn-large">Generate</a>
    </div>
    </body>




    </html>

Here is my html and php code, I have read over it many and many times and changed my php code multiple times. As you can see it outputs "Nothing" when nothing is in the database. But the problem is there are things in the database, any help is appreciated.