This question already has an answer here:
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>