1
我得到「警告:mysqli_num_rows()預計參數1被mysqli_result,布爾給予」當我使用此代碼:我不能得到任何結果與此代碼顯示
$sql = "SELECT name, time, age FROM friends WHERE age = " .$age. "limit 0, 10";
$secquery = mysqli_query($conn, $sql);
if (mysqli_num_rows($secquery) > 0){
while($row = $secquery->fetch_assoc()) {
echo "This person === ".$row['name']. " matched your age, which is " .$row['age']. '<br>';
}
}
我想匹配記錄在我的數據庫與輸入的記錄。我已經嘗試了一切。一點幫助?
看起來像您的查詢中有錯誤。嘗試輸入'mysqli_error($ conn)' – rokas