Bạn cần chuyển tập hợp kết quả từ SELECT
truy vấn trước khi gọi ->num_rows()
phương pháp.
// your code
$stmt->execute();
$stmt->store_result();
$numRows = $stmt->num_rows;
echo $numRows;
Đây là tài liệu tham khảo:
Bạn cần chuyển tập hợp kết quả từ SELECT
truy vấn trước khi gọi ->num_rows()
phương pháp.
// your code
$stmt->execute();
$stmt->store_result();
$numRows = $stmt->num_rows;
echo $numRows;
Đây là tài liệu tham khảo: