PHP fetch_array()期望参数1 [重复]

This is the error I get now:

T01
Warning: mysqli_error() expects exactly 1 parameter, 0 given
Error:

Below is my source code. I printed out $TID to make sure it had the correct value and indeed it does. I can't seem to get this working properly.

*** EDIT -- I changed the coding around

echo $TID;

            $query_sched = "SELECT * FROM Team WHERE TID = $TID";
                    $sched = $dbc->query($query_sched); 
            if ($sched === false){
                // error occured;
               echo "Error: ".mysqli_error();
                   exit;
            }
            $row = mysqli_fetch_array($sched, MYSQLI_ASSOC);

            echo '<tr>
                <td>' . $row['name'] . '</td>
                <td id="cellright">' . $teams[$i][1] . '</td>
                <td id="cellright">' . $teams[$i][2] . '</td>
                <td id="cellright">' . number_format($wnpctg,3) . '</td>
            </tr>';
        }
</div>

You need to wrap your query in double quotes and wrap the value you're searching in single quotes.

"SELECT * FROM Team where TID = '$TID'"

Your query failed, here is how you can see the error:

$sched = $dbc->query($query_sched); 

if ($sched === false){
    // error occured;
    echo "Error: ".mysqli_error($link);
    exit;
}

In my opinion it failed because you used $TID and the query is surrounded by single quotes, so the varialbe $TID is never replaced with its value. This should work:

$query_sched = "SELECT * FROM Team where TID = $TID"; using double quotes.

Read more about errors here