表中只有30个值但 mysqli_num_rows($result) return 60 相同的查询正在执行两次,这里是代码:

<?php 

error_reporting(E_ALL);
$con=mysqli_connect('127.0.0.1','***','***','***');
if (mysqli_connect_errno()) {
    # code...
    echo "Could not connect to MYSQL database".mysqli_connect_error();
}

$sql = "select * from ticket_staff";
$result = mysqli_query($con, $sql);
echo mysqli_num_rows($result);
if (mysqli_num_rows($result) > 0) {
    // output data of each row
    while($row = mysqli_fetch_assoc($result)) {
        echo   $row["t_ID"]."<br>";
    }
} else {
    echo "0 results";
}


?>

here is the screenshot of output