亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

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

致命錯誤:無法使用mysqli_result類型的對象

致命錯誤:無法使用mysqli_result類型的對象

小唯快跑啊 2019-11-19 15:28:40
當我注意到我的一個模組給我這個錯誤時,我將要打開我的網站:致命錯誤:無法在第303行的/var/www/vbsubscribetouser.php中將mysqli_result類型的對象用作數組我去了303行,這就是我發現的內容://Check if requested username can be followed.if (in_array($followingdata['usergroupid'], explode("|", $vbulletin->options['subscribetouser_usergroups_cannot']))){這是從第303行開始的所有代碼://Check if requested username can be followed.if (in_array($followingdata['usergroupid'], explode("|", $vbulletin->options['subscribetouser_usergroups_cannot']))){    exit;}if ($followinginfo[subscribers] > 0){    $user_followers = $followinginfo[followers].$userinfo[userid].'|';}else{    $user_followers = '|'.$userinfo[userid].'|';}$vbulletin->db->query_write("    UPDATE " . TABLE_PREFIX . "user    SET subscribers = subscribers + 1, `followers` = '$user_followers'    WHERE userid = $followinginfo[userid]");我不是php編碼方面的專家,因此在打開網站之前會有所幫助。任何幫助/建議嗎?非常感謝你!
查看完整描述

1 回答

?
哆啦的時光機

TA貢獻1779條經驗 獲得超6個贊

無法將類型為mysqli_result的對象用作數組


使用mysqli_fetch_assoc或mysqli_fetch_array提取結果行作為關聯數組。


$query = "SELECT 1";

$result = $mysqli->query($query);

$followingdata = $result->fetch_assoc()

要么


$followingdata = $result->fetch_array(MYSQLI_ASSOC);


查看完整回答
反對 回復 2019-11-19
  • 1 回答
  • 0 關注
  • 550 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號