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

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

警告:mysqli_ERROR()需要精確的一個(gè)參數(shù),0給定的錯(cuò)誤

警告:mysqli_ERROR()需要精確的一個(gè)參數(shù),0給定的錯(cuò)誤

慕的地6264312 2019-07-03 10:26:38
警告:mysqli_ERROR()需要精確的一個(gè)參數(shù),0給定的錯(cuò)誤我正在學(xué)習(xí)一個(gè)教程,但是本教程的作者不回答問題-但這是我的查詢我得到了以下錯(cuò)誤警告:mysqli_error()需要精確的1參數(shù),0給定,問題在于這一行代碼-$query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error());整個(gè)代碼是session_start();require_once "scripts/connect_to_mysql2.php"; //Build Main Navigation menu and gather page data here$sqlCommand = "SELECT id, linklabel FROM pages ORDER BY pageorder ASC"; $query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error()); $menuDisplay = '';while ($row = mysqli_fetch_array($query)) {      $pid = $row["id"];     $linklabel = $row["linklabel"];     $menuDisplay .= '<a href="index.php?pid=' . $pid . '">' . $linklabel . '</a><br />';} mysqli_free_result($query);所包含的文件有以下行$myConnection = mysqli_connect("$db_host","$db_username","$db_pass","$db_name") or die ("could not connect to mysql");  with reference to $myConnection, why do I get this error?謝謝
查看完整描述

3 回答

?
眼眸繁星

TA貢獻(xiàn)1873條經(jīng)驗(yàn) 獲得超9個(gè)贊

mysqli_error功能要求$myConnection作為參數(shù),這就是為什么您會(huì)收到警告


查看完整回答
反對 回復(fù) 2019-07-03
?
慕標(biāo)琳琳

TA貢獻(xiàn)1830條經(jīng)驗(yàn) 獲得超9個(gè)贊

首先,問題在于您沒有為mysqli_Error設(shè)置任何參數(shù)。我可以看到,這個(gè)問題已經(jīng)根據(jù)這里的帖子解決了。最有可能的是,下一個(gè)問題是所包含的文件路徑錯(cuò)誤。..

你確定這段代碼

$myConnection = mysqli_connect("$db_host","$db_username","$db_pass","$db_name") or die ("could not connect to mysql");

是否在“腳本”文件夾中,并且您的主代碼文件與腳本文件夾的級別相同?


查看完整回答
反對 回復(fù) 2019-07-03
  • 3 回答
  • 0 關(guān)注
  • 751 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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