Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, bool given in /home/whisper_a/public_html/followerInfo.php on line 19
Warning: mysqli_stmt_execute() expects parameter 1 to be mysqli_stmt, bool given in /home/whisper_a/public_html/followerInfo.php on line 22
Warning: mysqli_stmt_bind_result() expects parameter 1 to be mysqli_stmt, bool given in /home/whisper_a/public_html/followerInfo.php on line 23
Notice: Undefined variable: stmtsmysqli_stmt_fetch in /home/whisper_a/public_html/followerInfo.php on line 25
Fatal error: Uncaught Error: Function name must be a string in /home/whisper_a/public_html/followerInfo.php:25 Stack trace: #0 {main} thrown in /home/whisper_a/public_html/followerInfo.php on line 25
エラーが出てる一部のコード
//2
$mysqli =dbConnect();
//3
$query = "SELECT u.userId,u.userName,u.iconPath, IFNULL(w.cnt,0),IFNULL(f.cnt,0),IFNULL(fe.cnt,0)
FROM user AS u JOIN follow AS fo ON fo.followUserId = u.userId
LEFT OUTER JOIN whisperCntView AS w ON u.userId = w.userId
LEFT OUTER JOIN followCntView AS f ON u.userId = f.userId
LEFT OUTER JOIN followerCntView AS fe ON u.userId = fe.followUseId
WHERE fo.userId = ?";
$stmt = mysqli_prepare($mysqli, $query);
line19 **mysqli_stmt_bind_param($stmt, 's', $userid);
//sql文の実行
line 22 mysqli_stmt_execute($stmt);
line 23 mysqli_stmt_bind_result($stmt,$userId,$userName, $icon, $whisperCount, $followCount, $followerCount);
//4
line 25 while ($stmtsmysqli_stmt_fetch($stmt)){
//イイねフラグがnull以外の場合はtrueを、それ以外の場合はfalseをセットする。
$wsGoodFlg = FALSE;
if(!is_null($goodFlg)){
$wsGoodFlg = TRUE;
}
//ささやきリストの連想配列にデータを追加する
$followList[] = array(
'userId' => $userId,
'userName' => $userName,
'icon' => $icon,
'whisperCount' => $whisperCount,
'followCount' => $followCount,
'followerCount' => $followerCount
);
}
//5
mysqli_stmt_close($stmt);
試したことは$stmtが原因と思ったので$mysqliに変更したのですがダメでした
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー