第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

PHP 未獲取表行數(shù)據(jù),警告:mysqli_fetch_row() 期望參數(shù) 1 為

PHP 未獲取表行數(shù)據(jù),警告:mysqli_fetch_row() 期望參數(shù) 1 為

PHP
智慧大石 2023-06-18 16:18:23
誰能幫我嗎?我想顯示完整的 mysql 數(shù)據(jù)庫表結(jié)果,但出現(xiàn)錯誤:我們有聯(lián)系。警告:mysqli_fetch_row() 期望參數(shù) 1 為 mysqli_result,第 28 行 C:\xampp\htdocs\test\fetch.php 中給出的字符串    $connection = mysqli_connect('127.0.0.1:3307','root','','loginapp');    if($connection){        echo "We are connected.";    }    $query = "SELECT * FROM users";    mysqli_query($connection,$query);?><!DOCTYPE html><html><head>    <meta charset="UTF-8">    <title>Display</title>    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"></head><body>    <div class="container">        <div class="col-md-6"><?php while($result = mysqli_fetch_row($query)){        print_r($result);    } ?>  </div>    </div></body></html>  ```
查看完整描述

1 回答

?
慕絲7291255

TA貢獻1859條經(jīng)驗 獲得超6個贊

您直接在 mysqli_fetch_row() 函數(shù)中傳遞查詢,您應(yīng)該傳遞 mysql 查詢


mysqli_query($connection,$query); 到 $querynew = mysqli_query($connection,$query); 并在 while($result = mysqli_fetch_row($querynew)){


像下面這樣


$connection = mysqli_connect('127.0.0.1:3307','root','','loginapp');

        if($connection){


            echo "We are connected.";

        }


        $query = "SELECT * FROM users";


        $querynew = mysqli_query($connection,$query);


        while($result = mysqli_fetch_row($querynew)){


            print_r($result);

        }


查看完整回答
反對 回復(fù) 2023-06-18
  • 1 回答
  • 0 關(guān)注
  • 150 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號